summaryrefslogtreecommitdiffstats
path: root/collectors/timex.plugin/plugin_timex.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:00 +0000
commit03bf87dcb06f7021bfb2df2fa8691593c6148aff (patch)
treee16b06711a2ed77cafb4b7754be0220c3d14a9d7 /collectors/timex.plugin/plugin_timex.c
parentAdding upstream version 1.36.1. (diff)
downloadnetdata-03bf87dcb06f7021bfb2df2fa8691593c6148aff.tar.xz
netdata-03bf87dcb06f7021bfb2df2fa8691593c6148aff.zip
Adding upstream version 1.37.0.upstream/1.37.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/timex.plugin/plugin_timex.c')
-rw-r--r--collectors/timex.plugin/plugin_timex.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/collectors/timex.plugin/plugin_timex.c b/collectors/timex.plugin/plugin_timex.c
index 0390b9920..46cfc5796 100644
--- a/collectors/timex.plugin/plugin_timex.c
+++ b/collectors/timex.plugin/plugin_timex.c
@@ -109,8 +109,6 @@ void *timex_main(void *ptr)
RRDSET_TYPE_LINE);
rd_sync_state = rrddim_add(st_sync_state, "state", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
- } else {
- rrdset_next(st_sync_state);
}
rrddim_set_by_pointer(st_sync_state, rd_sync_state, sync_state != TIME_ERROR ? 1 : 0);
@@ -137,13 +135,11 @@ void *timex_main(void *ptr)
sta_codes[i].rd =
rrddim_add(st_clock_status, sta_codes[i].name, NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
}
- } else {
- rrdset_next(st_clock_status);
}
- for (int i = 0; sta_codes[i].name != NULL; i++) {
+ for (int i = 0; sta_codes[i].name != NULL; i++)
rrddim_set_by_pointer(st_clock_status, sta_codes[i].rd, timex_buf.status & sta_codes[i].code ? 1 : 0);
- }
+
rrdset_done(st_clock_status);
}
@@ -167,8 +163,6 @@ void *timex_main(void *ptr)
RRDSET_TYPE_LINE);
rd_offset = rrddim_add(st_offset, "offset", NULL, 1, divisor, RRD_ALGORITHM_ABSOLUTE);
- } else {
- rrdset_next(st_offset);
}
rrddim_set_by_pointer(st_offset, rd_offset, timex_buf.offset);