diff --git a/RTCP/Cobalt/GPUProc/src/Station/StationInput.cc b/RTCP/Cobalt/GPUProc/src/Station/StationInput.cc index 8c2fb2fa69646e822340a33166bc7b416eef7065..011204dc953ed7f1cba325cfd1db60f07335aeb3 100644 --- a/RTCP/Cobalt/GPUProc/src/Station/StationInput.cc +++ b/RTCP/Cobalt/GPUProc/src/Station/StationInput.cc @@ -169,6 +169,9 @@ namespace LOFAR { mode(ps.settings.nrBitsPerSample, ps.settings.clockMHz), nrBoards(ps.settings.antennaFields.at(stationIdx).inputStreams.size()), + loggedSeenFutureData(0), + loggedNonRealTime(0), + targetSubbands(values(subbandDistribution)), beamletIndices(generateBeamletIndices()) { @@ -330,9 +333,14 @@ namespace LOFAR { const TimeStamp now = TimeStamp::now(mode.clockHz()); if (deadline < now) { - // We're too late! Don't process data, or we'll get even further behind! - LOG_ERROR_STR(logPrefix << "[block " << current.block << "] Not running at real time! Deadline was " << - TimeStamp(now - deadline, deadline.getClock()).getSeconds() << " seconds ago"); + // Only emit log lines every minute seconds to prevent spam + if (loggedNonRealTime + mode.secondsToSamples(60) < now) { + // We're too late! Don't process data, or we'll get even further behind! + LOG_ERROR_STR(logPrefix << "[block " << current.block << "] Not running at real time! Deadline was " << + TimeStamp(now - deadline, deadline.getClock()).getSeconds() << " seconds ago"); + + loggedNonRealTime = now; + } } else { // One core can't handle the load, so use multiple @@ -364,7 +372,11 @@ namespace LOFAR { // We have data (potentially) spilling into `next'. if (next->write(packet, beamletIndices, nrBeamletIndices)) { - LOG_WARN_STR(logPrefix << "Received data for several blocks into the future -- discarding."); + // Only emit log lines every minute seconds to prevent spam + if (loggedSeenFutureData + mode.secondsToSamples(60) < now) { + LOG_ERROR_STR(logPrefix << "Received data for several blocks into the future -- discarding."); + loggedSeenFutureData = now; + } } } } diff --git a/RTCP/Cobalt/GPUProc/src/Station/StationInput.h b/RTCP/Cobalt/GPUProc/src/Station/StationInput.h index 99e815f8a97d40601ac04223317d86f180301e8e..b3f655b4dde27fe136f5ea86a4ad4512b881ba97 100644 --- a/RTCP/Cobalt/GPUProc/src/Station/StationInput.h +++ b/RTCP/Cobalt/GPUProc/src/Station/StationInput.h @@ -112,6 +112,10 @@ namespace LOFAR { const size_t nrBoards; std::vector< SmartPtr< Pool< RSPData > > > rspDataPool; // [nrboards] + // Whether we emitted certain errors (to prevent log spam) + TimeStamp loggedSeenFutureData; + TimeStamp loggedNonRealTime; + const std::vector<size_t> targetSubbands; // Mapping of