summaryrefslogtreecommitdiffstats
path: root/src/daemon/global_statistics.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:33:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:34:10 +0000
commit83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch)
tree2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/daemon/global_statistics.c
parentReleasing debian version 1.47.5-1. (diff)
downloadnetdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz
netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/daemon/global_statistics.c')
-rw-r--r--src/daemon/global_statistics.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/daemon/global_statistics.c b/src/daemon/global_statistics.c
index 17fd53761..236298a59 100644
--- a/src/daemon/global_statistics.c
+++ b/src/daemon/global_statistics.c
@@ -3502,8 +3502,7 @@ static struct worker_utilization all_workers_utilization[] = {
{ .name = "DBENGINE", .family = "workers dbengine instances", .priority = 1000000 },
{ .name = "LIBUV", .family = "workers libuv threadpool", .priority = 1000000 },
{ .name = "WEB", .family = "workers web server", .priority = 1000000 },
- { .name = "ACLKQUERY", .family = "workers aclk query", .priority = 1000000 },
- { .name = "ACLKSYNC", .family = "workers aclk host sync", .priority = 1000000 },
+ { .name = "ACLKSYNC", .family = "workers aclk sync", .priority = 1000000 },
{ .name = "METASYNC", .family = "workers metadata sync", .priority = 1000000 },
{ .name = "PLUGINSD", .family = "workers plugins.d", .priority = 1000000 },
{ .name = "STATSD", .family = "workers plugin statsd", .priority = 1000000 },
@@ -4222,13 +4221,15 @@ void *global_statistics_main(void *ptr)
global_statistics_register_workers();
int update_every =
- (int)config_get_number(CONFIG_SECTION_GLOBAL_STATISTICS, "update every", localhost->rrd_update_every);
- if (update_every < localhost->rrd_update_every)
+ (int)config_get_duration_seconds(CONFIG_SECTION_GLOBAL_STATISTICS, "update every", localhost->rrd_update_every);
+ if (update_every < localhost->rrd_update_every) {
update_every = localhost->rrd_update_every;
+ config_set_duration_seconds(CONFIG_SECTION_GLOBAL_STATISTICS, "update every", update_every);
+ }
usec_t step = update_every * USEC_PER_SEC;
heartbeat_t hb;
- heartbeat_init(&hb);
+ heartbeat_init(&hb, USEC_PER_SEC);
usec_t real_step = USEC_PER_SEC;
// keep the randomness at zero
@@ -4237,7 +4238,7 @@ void *global_statistics_main(void *ptr)
while (service_running(SERVICE_COLLECTORS)) {
worker_is_idle();
- heartbeat_next(&hb, USEC_PER_SEC);
+ heartbeat_next(&hb);
if (real_step < step) {
real_step += USEC_PER_SEC;
continue;
@@ -4278,18 +4279,20 @@ void *global_statistics_extended_main(void *ptr)
global_statistics_register_workers();
int update_every =
- (int)config_get_number(CONFIG_SECTION_GLOBAL_STATISTICS, "update every", localhost->rrd_update_every);
- if (update_every < localhost->rrd_update_every)
+ (int)config_get_duration_seconds(CONFIG_SECTION_GLOBAL_STATISTICS, "update every", localhost->rrd_update_every);
+ if (update_every < localhost->rrd_update_every) {
update_every = localhost->rrd_update_every;
+ config_set_duration_seconds(CONFIG_SECTION_GLOBAL_STATISTICS, "update every", update_every);
+ }
usec_t step = update_every * USEC_PER_SEC;
heartbeat_t hb;
- heartbeat_init(&hb);
+ heartbeat_init(&hb, USEC_PER_SEC);
usec_t real_step = USEC_PER_SEC;
while (service_running(SERVICE_COLLECTORS)) {
worker_is_idle();
- heartbeat_next(&hb, USEC_PER_SEC);
+ heartbeat_next(&hb);
if (real_step < step) {
real_step += USEC_PER_SEC;
continue;