diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:33:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:34:10 +0000 |
commit | 83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch) | |
tree | 2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/collectors/macos.plugin | |
parent | Releasing debian version 1.47.5-1. (diff) | |
download | netdata-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/collectors/macos.plugin')
-rw-r--r-- | src/collectors/macos.plugin/integrations/macos.md | 4 | ||||
-rw-r--r-- | src/collectors/macos.plugin/macos_fw.c | 10 | ||||
-rw-r--r-- | src/collectors/macos.plugin/macos_mach_smi.c | 1 | ||||
-rw-r--r-- | src/collectors/macos.plugin/macos_sysctl.c | 11 | ||||
-rw-r--r-- | src/collectors/macos.plugin/plugin_macos.c | 5 |
5 files changed, 4 insertions, 27 deletions
diff --git a/src/collectors/macos.plugin/integrations/macos.md b/src/collectors/macos.plugin/integrations/macos.md index 9445b9a61..6b9e3f239 100644 --- a/src/collectors/macos.plugin/integrations/macos.md +++ b/src/collectors/macos.plugin/integrations/macos.md @@ -188,8 +188,8 @@ The file format is a modified INI syntax. The general structure is: [section2] option3 = some third value ``` -You can edit the configuration file using the `edit-config` script from the -Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory). +You can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script from the +Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#the-netdata-config-directory). ```bash cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata diff --git a/src/collectors/macos.plugin/macos_fw.c b/src/collectors/macos.plugin/macos_fw.c index 75ef386b9..a97c5bc25 100644 --- a/src/collectors/macos.plugin/macos_fw.c +++ b/src/collectors/macos.plugin/macos_fw.c @@ -199,7 +199,6 @@ int do_macos_iokit(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "reads", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "writes", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL); @@ -235,7 +234,6 @@ int do_macos_iokit(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_AREA ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "utilization", NULL, 1, 10000000, RRD_ALGORITHM_INCREMENTAL); } @@ -270,7 +268,6 @@ int do_macos_iokit(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "reads", NULL, 1, 1000000, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "writes", NULL, -1, 1000000, RRD_ALGORITHM_INCREMENTAL); @@ -302,7 +299,6 @@ int do_macos_iokit(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "reads", NULL, 1, 1000000, RRD_ALGORITHM_ABSOLUTE); rrddim_add(st, "writes", NULL, -1, 1000000, RRD_ALGORITHM_ABSOLUTE); @@ -330,7 +326,6 @@ int do_macos_iokit(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_AREA ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "reads", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE); rrddim_add(st, "writes", NULL, -1, 1024, RRD_ALGORITHM_ABSOLUTE); @@ -358,7 +353,6 @@ int do_macos_iokit(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "svctm", NULL, 1, 1000000, RRD_ALGORITHM_ABSOLUTE); } @@ -549,7 +543,6 @@ int do_macos_iokit(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "received", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "sent", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL); @@ -579,7 +572,6 @@ int do_macos_iokit(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "inbound", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "outbound", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL); @@ -605,7 +597,6 @@ int do_macos_iokit(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "inbound", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); } @@ -629,7 +620,6 @@ int do_macos_iokit(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "frames", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "collisions", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL); diff --git a/src/collectors/macos.plugin/macos_mach_smi.c b/src/collectors/macos.plugin/macos_mach_smi.c index 30c957187..fa88a5b7c 100644 --- a/src/collectors/macos.plugin/macos_mach_smi.c +++ b/src/collectors/macos.plugin/macos_mach_smi.c @@ -192,7 +192,6 @@ int do_macos_mach_smi(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "memory", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "cow", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); diff --git a/src/collectors/macos.plugin/macos_sysctl.c b/src/collectors/macos.plugin/macos_sysctl.c index 825125365..83e941df4 100644 --- a/src/collectors/macos.plugin/macos_sysctl.c +++ b/src/collectors/macos.plugin/macos_sysctl.c @@ -278,7 +278,6 @@ int do_macos_sysctl(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_STACKED ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "free", NULL, 1, 1048576, RRD_ALGORITHM_ABSOLUTE); rrddim_add(st, "used", NULL, 1, 1048576, RRD_ALGORITHM_ABSOLUTE); @@ -411,7 +410,6 @@ int do_macos_sysctl(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "InErrs", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "InCsumErrors", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); @@ -441,7 +439,6 @@ int do_macos_sysctl(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "EstabResets", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "ActiveOpens", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); @@ -564,7 +561,6 @@ int do_macos_sysctl(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "InCEPkts", "CEP", 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "InNoECTPkts", "NoECTP", -1, 1, RRD_ALGORITHM_INCREMENTAL); @@ -631,7 +627,6 @@ int do_macos_sysctl(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "RcvbufErrors", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "InErrors", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); @@ -819,7 +814,6 @@ int do_macos_sysctl(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "FragOKs", "ok", 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "FragFails", "failed", -1, 1, RRD_ALGORITHM_INCREMENTAL); @@ -849,7 +843,6 @@ int do_macos_sysctl(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "ReasmOKs", "ok", 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "ReasmFails", "failed", -1, 1, RRD_ALGORITHM_INCREMENTAL); @@ -879,7 +872,6 @@ int do_macos_sysctl(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "InDiscards", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "OutDiscards", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL); @@ -963,7 +955,6 @@ int do_macos_sysctl(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "ok", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "failed", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL); @@ -994,7 +985,6 @@ int do_macos_sysctl(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "ok", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "failed", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL); @@ -1027,7 +1017,6 @@ int do_macos_sysctl(int update_every, usec_t dt) { , update_every , RRDSET_TYPE_LINE ); - rrdset_flag_set(st, RRDSET_FLAG_DETAIL); rrddim_add(st, "InDiscards", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL); rrddim_add(st, "OutDiscards", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL); diff --git a/src/collectors/macos.plugin/plugin_macos.c b/src/collectors/macos.plugin/plugin_macos.c index 0d651ae69..6f5b892d8 100644 --- a/src/collectors/macos.plugin/plugin_macos.c +++ b/src/collectors/macos.plugin/plugin_macos.c @@ -54,13 +54,12 @@ void *macos_main(void *ptr) worker_register_job_name(i, macos_modules[i].dim); } - usec_t step = localhost->rrd_update_every * USEC_PER_SEC; heartbeat_t hb; - heartbeat_init(&hb); + heartbeat_init(&hb, localhost->rrd_update_every * USEC_PER_SEC); while(service_running(SERVICE_COLLECTORS)) { worker_is_idle(); - usec_t hb_dt = heartbeat_next(&hb, step); + usec_t hb_dt = heartbeat_next(&hb); if (!service_running(SERVICE_COLLECTORS)) break; |