added more information to info logs about data collection timings; #3505
Costa Tsaousis (ktsaou) committed
Mar 8, 2018 at 00:19 UTC
8ad83438632e104f41dfd4882039b298075bd900
1 file changed
+4
-4
src/rrdset.c
+4
-4
@@ -710,7 +710,7 @@ RRDSET *rrdset_create_custom(
710
// RRDSET - data collection iteration control
711
712
inline void rrdset_next_usec_unfiltered(RRDSET *st, usec_t microseconds) {
713
- if(unlikely(!st->last_collected_time.tv_sec || !microseconds || (st->counter % remote_clock_resync_iterations) == 0)) {
713
+ if(unlikely(!st->last_collected_time.tv_sec || !microseconds)) {
714
// call the full next_usec() function
715
rrdset_next_usec(st, microseconds);
716
return;
@@ -737,7 +737,7 @@ inline void rrdset_next_usec(RRDSET *st, usec_t microseconds) {
737
738
if(unlikely(since_last_usec < 0)) {
739
// oops! the database is in the future
740
- info("RRD database for chart '%s' on host '%s' is %0.5" LONG_DOUBLE_MODIFIER " secs in the future. Adjusting it to current time.", st->id, st->rrdhost->hostname, (LONG_DOUBLE)-since_last_usec / USEC_PER_SEC);
740
+ info("RRD database for chart '%s' on host '%s' is %0.5" LONG_DOUBLE_MODIFIER " secs in the future (counter #%zu, update #%zu). Adjusting it to current time.", st->id, st->rrdhost->hostname, (LONG_DOUBLE)-since_last_usec / USEC_PER_SEC, st->counter, st->counter_done);
741
742
st->last_collected_time.tv_sec = now.tv_sec - st->update_every;
743
st->last_collected_time.tv_usec = now.tv_usec;
@@ -751,7 +751,7 @@ inline void rrdset_next_usec(RRDSET *st, usec_t microseconds) {
751
}
752
else if(unlikely((usec_t)since_last_usec > (usec_t)(st->update_every * 10 * USEC_PER_SEC))) {
753
// oops! the database is too far behind
754
- info("RRD database for chart '%s' on host '%s' is %0.5" LONG_DOUBLE_MODIFIER " secs in the past. Adjusting it to current time.", st->id, st->rrdhost->hostname, (LONG_DOUBLE)since_last_usec / USEC_PER_SEC);
754
+ info("RRD database for chart '%s' on host '%s' is %0.5" LONG_DOUBLE_MODIFIER " secs in the past (counter #%zu, update #%zu). Adjusting it to current time.", st->id, st->rrdhost->hostname, (LONG_DOUBLE)since_last_usec / USEC_PER_SEC, st->counter, st->counter_done);
755
756
microseconds = (usec_t)since_last_usec;
757
}
@@ -1107,7 +1107,7 @@ void rrdset_done(RRDSET *st) {
1107
1108
// check if the chart has a long time to be updated
1109
if(unlikely(st->usec_since_last_update > st->entries * update_every_ut)) {
1110
- info("host '%s', chart %s: took too long to be updated (%0.3" LONG_DOUBLE_MODIFIER " secs). Resetting it.", st->rrdhost->hostname, st->name, (LONG_DOUBLE)st->usec_since_last_update / USEC_PER_SEC);
1110
+ info("host '%s', chart %s: took too long to be updated (counter #%zu, update #%zu, %0.3" LONG_DOUBLE_MODIFIER " secs). Resetting it.", st->rrdhost->hostname, st->name, st->counter, st->counter_done, (LONG_DOUBLE)st->usec_since_last_update / USEC_PER_SEC);
1111
rrdset_reset(st);
1112
st->usec_since_last_update = update_every_ut;
1113
store_this_entry = 0;