]> git.ipfire.org Git - thirdparty/collectd.git/log
thirdparty/collectd.git
16 months agoMerge pull request #4190 from octo/6/swap releaser-test
Florian Forster [Fri, 26 Jan 2024 15:04:48 +0000 (16:04 +0100)] 
Merge pull request #4190 from octo/6/swap

 [collectd 6] Swap plugin: Migrate to collectd 6 data structures.

16 months agoswap plugin: Patch the "total" value through to `swap_append_usage3`. 4190/head
Florian Forster [Fri, 26 Jan 2024 14:04:32 +0000 (15:04 +0100)] 
swap plugin: Patch the "total" value through to `swap_append_usage3`.

16 months agosrc/collectd.conf.in: Fix default of `ReportBytes`.
Eero Tamminen [Fri, 26 Jan 2024 13:05:44 +0000 (14:05 +0100)] 
src/collectd.conf.in: Fix default of `ReportBytes`.

16 months agocollectd.conf(5): Improve wording for `ReportBytes`.
Eero Tamminen [Fri, 26 Jan 2024 13:00:57 +0000 (14:00 +0100)] 
collectd.conf(5): Improve wording for `ReportBytes`.

16 months agoswap plugin: Call `plugin_dispatch_metric_family` unconditionally.
Florian Forster [Fri, 26 Jan 2024 12:59:04 +0000 (13:59 +0100)] 
swap plugin: Call `plugin_dispatch_metric_family` unconditionally.

16 months agoswap plugin: Rename `swap_submit_*` to `swap_append_*`.
Florian Forster [Fri, 26 Jan 2024 12:58:20 +0000 (13:58 +0100)] 
swap plugin: Rename `swap_submit_*` to `swap_append_*`.

16 months agoswap plugin: Report utilization as fraction of one.
Florian Forster [Mon, 15 Jan 2024 19:47:17 +0000 (20:47 +0100)] 
swap plugin: Report utilization as fraction of one.

16 months agoswap plugin: Populate the `unit` field.
Florian Forster [Wed, 10 Jan 2024 21:19:58 +0000 (22:19 +0100)] 
swap plugin: Populate the `unit` field.

16 months agoswap plugin: Add the `ReportUsage` and `ReportUtilization` config options.
Florian Forster [Wed, 10 Jan 2024 21:00:03 +0000 (22:00 +0100)] 
swap plugin: Add the `ReportUsage` and `ReportUtilization` config options.

16 months agoswap plugin: Add descriptions to metric families.
Florian Forster [Wed, 27 Dec 2023 09:20:31 +0000 (10:20 +0100)] 
swap plugin: Add descriptions to metric families.

16 months agoswap plugin: Use constants for label names and well-known label values.
Florian Forster [Wed, 27 Dec 2023 09:20:10 +0000 (10:20 +0100)] 
swap plugin: Use constants for label names and well-known label values.

16 months agoswap plugin: Use different metric families for I/O reporting in bytes.
Florian Forster [Wed, 27 Dec 2023 09:16:26 +0000 (10:16 +0100)] 
swap plugin: Use different metric families for I/O reporting in bytes.

Depending on the "ReportIO" setting, the plugin may emit paging operations
or bytes. Use a different metric family for these two metrics.

This also moves the decision whether or not to report I/O to the
`swap_submit_io`. This fixes a bug on NetBSD where I/O was reported
even if "ReportIO" was set to false.

16 months agoswap plugin: Group metrics into fewer metric families.
Florian Forster [Thu, 14 Dec 2023 16:54:09 +0000 (17:54 +0100)] 
swap plugin: Group metrics into fewer metric families.

This should align this plugin with the OpenTelemetry semantic conventions:
https://opentelemetry.io/docs/specs/semconv/system/system-metrics/#pagingswap-metrics

16 months agoDeclare metric families as an array
Manuel Luis Sanmartín Rozada [Sat, 23 Jan 2021 23:41:12 +0000 (00:41 +0100)] 
Declare metric families as an array

16 months agoFix error message
Manuel Luis Sanmartín Rozada [Sat, 23 Jan 2021 23:12:27 +0000 (00:12 +0100)] 
Fix error message

16 months agoChangeLog: swap: plugin: migration to v6.0
Manuel Luis Sanmartín Rozada [Wed, 20 Jan 2021 23:17:18 +0000 (00:17 +0100)] 
ChangeLog: swap: plugin: migration to v6.0

16 months agoAuto-Merge pull request #4252 from octo/6/df
collectd bot [Wed, 24 Jan 2024 14:32:57 +0000 (15:32 +0100)] 
Auto-Merge pull request #4252 from octo/6/df

Automatically merged due to "Automerge" label

16 months agofix: df plugin: Fix an array out of bounds crash. 4252/head
Florian Forster [Wed, 24 Jan 2024 14:08:14 +0000 (15:08 +0100)] 
fix: df plugin: Fix an array out of bounds crash.

The second argument of the `for` loop always evaluated to true, causing the
code to read past the end of the array.

ChangeLog: df plugin: An out of bounds read, causing segmentation faults, has been fixed.

16 months agoBump version to 6.0.0; Update ChangeLog. collectd-6.0.0-rc0 collectd-6.0.0.rc0
Florian Forster [Tue, 23 Jan 2024 17:02:29 +0000 (18:02 +0100)] 
Bump version to 6.0.0; Update ChangeLog.

16 months agoAuto-Merge pull request #4251 from octo/6/cirrusci 6.0.0-rc0
collectd bot [Tue, 23 Jan 2024 15:56:17 +0000 (16:56 +0100)] 
Auto-Merge pull request #4251 from octo/6/cirrusci

Automatically merged due to "Automerge" label

16 months agoci: Remove the "statgrab" task from CirrusCI. 4251/head
Florian Forster [Tue, 23 Jan 2024 12:14:02 +0000 (13:14 +0100)] 
ci: Remove the "statgrab" task from CirrusCI.

The "statgrab" job builds collectd with the "statgrab" library and then expects
certain plugins to be linked against it. However, since the build runs on
Linux, the plugins are actually using the "native" implementation. The linker,
noticing that the plugin is not referring to any symbol in the statgrab
library, does not actually produce a link, causing the test to fail.

The native implementations provide much richer metrics than the libstatgrab
based implementations, so we'll drop the test.

16 months agoMerge pull request #4250 from octo/6/cirrusci
Florian Forster [Tue, 23 Jan 2024 12:11:12 +0000 (13:11 +0100)] 
Merge pull request #4250 from octo/6/cirrusci

.cirrus.yml: statgrab: Print `ldd` of failing plugins. Continue on error.

16 months ago.cirrus.yml: Verbose make build steps for the statgrab task. 4250/head
Florian Forster [Tue, 23 Jan 2024 10:40:01 +0000 (11:40 +0100)] 
.cirrus.yml: Verbose make build steps for the statgrab task.

16 months ago.cirrus.yml: `$` is redundant for variable names within `$((...))`
Eero Tamminen [Tue, 23 Jan 2024 10:24:59 +0000 (11:24 +0100)] 
.cirrus.yml: `$` is redundant for variable names within `$((...))`

... as shellcheck likes to often remind me.

16 months ago.cirrus.yml: Use YAML multi-line string that preserves newlines.
Florian Forster [Tue, 23 Jan 2024 10:23:06 +0000 (11:23 +0100)] 
.cirrus.yml: Use YAML multi-line string that preserves newlines.

16 months ago.cirrus.yml: Run the non-standard tasks on PRs, too.
Florian Forster [Tue, 23 Jan 2024 09:19:02 +0000 (10:19 +0100)] 
.cirrus.yml: Run the non-standard tasks on PRs, too.

16 months ago.cirrus.yml: statgrab: Print `ldd` of failing plugins. Continue on error.
Florian Forster [Tue, 23 Jan 2024 09:12:48 +0000 (10:12 +0100)] 
.cirrus.yml: statgrab: Print `ldd` of failing plugins. Continue on error.

16 months agoMerge pull request #4198 from octo/6/import_plugins
Florian Forster [Mon, 22 Jan 2024 20:32:21 +0000 (21:32 +0100)] 
Merge pull request #4198 from octo/6/import_plugins

[collectd 6] Import plugin changes from `main`.

16 months agointel_pmu plugin: Fix formatting of `counter_t` values. 4198/head
Florian Forster [Mon, 22 Jan 2024 19:45:44 +0000 (20:45 +0100)] 
intel_pmu plugin: Fix formatting of `counter_t` values.

16 months agocontrib/format.sh src/cpufreq.c
Florian Forster [Wed, 10 Jan 2024 20:49:16 +0000 (21:49 +0100)] 
contrib/format.sh src/cpufreq.c

16 months agosrc/vmem.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:56 +0000 (09:51 +0100)] 
src/vmem.c: Importing changes from `main`.

Changes:
9369ed71450430266ebd7ca410022c2b1b548fb4 vmem: add metrics starting with `pgrefill`
21ffe63374e08d9c3af28a0df33d46e4a908f84e vmem: add "scan" metrics starting with "pgscan_"
25364414f51603e6940fbc1853071e4bc0bb24aa vmem: add "pgscan_"
a8069c10a05d93b6aae0e52b1c6a14e54350fe6f vmem: add metrics start with "pgscan_" in Kernel Linux

16 months agosrc/virt.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:56 +0000 (09:51 +0100)] 
src/virt.c: Importing changes from `main`.

Changes:
b4bdc7a8486683533185db34f97fd0f219fdc36b Fix the virt plugin for Openstack wallaby and later use (#4011)
8c781279e9c4789936323670b729f9a979c976db virt: Add hugetlb_ metrics

16 months agosrc/ubi.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:56 +0000 (09:51 +0100)] 
src/ubi.c: Importing changes from `main`.

Changes:
8c56291be070d7fcb99158157e1d42256dc4930e ubi: add percent evaluation for the bad blocks
d4e3332fc5198504483c0eac2b83b6cc48feb01a ubi: perpartion for percentage evaluation of the bad blocks

16 months agosrc/swap.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:56 +0000 (09:51 +0100)] 
src/swap.c: Importing changes from `main`.

Changes:
284f51b21755693cb7cf927f002b26304fad7973 Removed extra call to swap_submit_usage.

16 months agosrc/smart_test.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:55 +0000 (09:51 +0100)] 
src/smart_test.c: Importing changes from `main`.

Changes:
d228c3129c270754b61bf3caae0af36bc7a9c73a Fic smart_test.c for big endian. (#3799)

16 months agosrc/processes.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:55 +0000 (09:51 +0100)] 
src/processes.c: Importing changes from `main`.

Changes:
d47b7020743e0ef942401b8cf143a0ac6476f9f5 clang format
71e99e00e21c8181408b590929f856830deac732 Compare both PID and process start time to avoid issues with immediate PID reuse on Linux platform.
9197134e7cd99206900f86f660be2135d028a2ab processes: format array size def in read fork_rate & ctxt
a8b4168ac2237449e3192be3dd2d07ef587fa3e2 processes: fix prints & remove useless comments
2495f75ea8fc4ac0f295b0bdd38cb5eeb1ddd7c4 processes: eliminate hardcoded arraysize in read ctxt & fork_rate
d2626382c6f0c506993ec13c4c2bcd69bad19371 processes: determine if ctxt is enabled before read_sys_ctxt_switch
0c41886ca975ed679e568210caa743af6bb75678 processes: format `/proc/stat` WARNING & ERROR
7a262979f76ebb5868320e09107bc02dc101ff07 processes: use buffer to read /proc/stat once according to procs_running
ffc486a93f980b4d0d859b5f627f859d1877646c processes: remove running++ since we calc it in procs_running later
c3bbd17e13558b15e09f0ecb374e44dfbf3623cd processes: make contextswitches configurable
dfd034032b7c7c8f821774715c0723c42cefd332 Add scalloc() and use it in src/processes.c (#4014)

16 months agosrc/ovs_stats.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:55 +0000 (09:51 +0100)] 
src/ovs_stats.c: Importing changes from `main`.

Changes:
dcd22696ebeb4556ed172b0253b90d38bebfc742 use derive_t instead of int inside ovs_stats_get_port_stat_value
91a642385e2d068d106aa5c307de968f8b33add5 bug#3924 fix

16 months agosrc/nginx.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:55 +0000 (09:51 +0100)] 
src/nginx.c: Importing changes from `main`.

Changes:
dd7e4fd34042483cc90ee2762f4b507fd6637d37 nginx: add support for unix domain sockets

16 months agosrc/mysql.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:55 +0000 (09:51 +0100)] 
src/mysql.c: Importing changes from `main`.

Changes:
01412323b712d753cca9aada2e439f6c46e0d30d MySQL plugin: Fix incorrect WSREP/Galera metric types.
ca59e01d7fcf8cd802375b74053d87c24ed27017 add questions metric for mysql plugin

16 months agosrc/intel_pmu.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:54 +0000 (09:51 +0100)] 
src/intel_pmu.c: Importing changes from `main`.

Changes:
0cac5b51626594c4e0291d03f06cc96eb5fe7d26 intel_pmu 2.0 - updates in collectd.conf.pod
549a22a8009ba82cf57aa70d1f3889a35a820042 intel_pmu 2.0 - change parameter name to AggregateUncorePMUs
2cd896a6c92629398fdffc559bdb5b578e107361 intel_pmu 2.0 - remove type from type instance
7e390a8231fddfe77085a5c68d2dee35fea78c54 intel_pmu 2.0 - bugfix & more verbose warning messages
9a483ae5b25d6da97d6bebdad2cd154a24274202 intel_pmu 2.0 - add name of pmu to plugin instance
16ed37e9b2b1a763b0236903ffa3087abbfc5cb5 intel_pmu 2.0 - Provide option to choose all events from EventList
e8e22b7a94f37ec5758f4f0bdcfc193dddc21130 intel_pmu 2.0 - Provide more data with metric
e838ecff613fd2ce255113cbfb4795c4b236d0ac intel_pmu 2.0 - updated version of plugin

16 months agosrc/hugepages.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:54 +0000 (09:51 +0100)] 
src/hugepages.c: Importing changes from `main`.

Changes:
4cebbfc1ed4b44644d981df996a8ca941e38e8a1 Hugepages plugin skips reading write-only file

16 months agosrc/cpufreq.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:54 +0000 (09:51 +0100)] 
src/cpufreq.c: Importing changes from `main`.

Changes:
5332f432633fb62fcd03b2540734b17e5785ab90 cpufreq: init max_avail_freqs with 128
d760819acbdc9a51c65b52c32cacec3ee9b991aa cpufreq: dynamically alloc max_avail_freqs according to time_in_state
45b676685b2a56545359c6b76985f95a56b99e72 cpufreq: format.sh cpufreq.c
31dbb8a334f9501662326496171f6cffd18bd92a cpufreq: make MAX_AVAIL_FREQS configurable in conf

16 months agosrc/collectd-nagios.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:54 +0000 (09:51 +0100)] 
src/collectd-nagios.c: Importing changes from `main`.

Changes:
d41fa79b7fda9b67601a7d7880d8e4b91a4500ce Feature/collectd nagios perfdata (#3879)

16 months agosrc/bind.c: Importing changes from `main`.
Florian Forster [Tue, 19 Dec 2023 08:51:54 +0000 (09:51 +0100)] 
src/bind.c: Importing changes from `main`.

Changes:
93fbc158d09b85b98333f08ab16ce2c79f8271c4 Fix glibc feature macro handling for timegm

16 months agoMerge pull request #4246 from octo/6/memory
Florian Forster [Mon, 22 Jan 2024 20:13:14 +0000 (21:13 +0100)] 
Merge pull request #4246 from octo/6/memory

[collectd 6] docs: Fix the default value of the memory plugin's `ReportLimit` option.

16 months agodocs: Fix the default value of the memory plugin's `ReportLimit` option. 4246/head
Florian Forster [Mon, 22 Jan 2024 19:32:23 +0000 (20:32 +0100)] 
docs: Fix the default value of the memory plugin's `ReportLimit` option.

16 months agoMerge pull request #4217 from octo/6/disk
Florian Forster [Mon, 22 Jan 2024 19:20:36 +0000 (20:20 +0100)] 
Merge pull request #4217 from octo/6/disk

[collectd 6] disk plugin: Align metrics with OpenTelemetry recommendations.

16 months agodisk plugin: Do submit metrics in the first iteration. 4217/head
Florian Forster [Mon, 22 Jan 2024 17:22:22 +0000 (18:22 +0100)] 
disk plugin: Do submit metrics in the first iteration.

16 months agodisk plugin: Remove the "avg time per op" calculation.
Florian Forster [Mon, 22 Jan 2024 17:18:50 +0000 (18:18 +0100)] 
disk plugin: Remove the "avg time per op" calculation.

The result was unused.

16 months agodisk plugin: Revamp the Linux code.
Florian Forster [Mon, 22 Jan 2024 17:07:31 +0000 (18:07 +0100)] 
disk plugin: Revamp the Linux code.

*   Use `counter_diff` to calculate counter differences.
*   Use `counter_t` as we actually want the counter overflow behavior for these metrics.
*   Remove the `has_...` fields from the global data struct.
*   Use `value_to_rate()` to calculate disk busyness.
*   Use `strtoull()` to parse counter values.

16 months agodisk plugin: Add `system.disk.io_time`, `system.disk.weighted_io_time`, and `system...
Florian Forster [Mon, 22 Jan 2024 16:00:35 +0000 (17:00 +0100)] 
disk plugin: Add `system.disk.io_time`, `system.disk.weighted_io_time`, and `system.disk.pending_operations` for Solaris.

16 months agodisk plugin: Consistently scale the `fam_disk_io_time` metric to microseconds.
Florian Forster [Mon, 22 Jan 2024 15:24:53 +0000 (16:24 +0100)] 
disk plugin: Consistently scale the `fam_disk_io_time` metric to microseconds.

16 months agodisk plugin: Improve metric descriptions.
Florian Forster [Fri, 19 Jan 2024 21:31:26 +0000 (22:31 +0100)] 
disk plugin: Improve metric descriptions.

Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
16 months agodisk plugin: Remove ops_time metric for Solaris.
Florian Forster [Fri, 19 Jan 2024 21:19:16 +0000 (22:19 +0100)] 
disk plugin: Remove ops_time metric for Solaris.

The fields do not mean what we thought they meant. "wtime" means "wait time",
"rtime" means "run time".

Fixes: #3875 (for collectd 6)
16 months agodisk plugin: Scale all time counters to microseconds.
Florian Forster [Fri, 19 Jan 2024 21:16:06 +0000 (22:16 +0100)] 
disk plugin: Scale all time counters to microseconds.

Also detone the time scale in the variable names.

16 months agodisk plugin: Use constants for the "direction" label values.
Florian Forster [Sun, 14 Jan 2024 21:50:16 +0000 (22:50 +0100)] 
disk plugin: Use constants for the "direction" label values.

16 months agodisk plugin: Fix incorrect type.
Florian Forster [Fri, 22 Dec 2023 12:55:48 +0000 (13:55 +0100)] 
disk plugin: Fix incorrect type.

16 months agodisk plugin: Align metrics with OpenTelemetry recommendations.
Florian Forster [Mon, 18 Dec 2023 13:40:06 +0000 (14:40 +0100)] 
disk plugin: Align metrics with OpenTelemetry recommendations.

* Rename labels to `system.device` and `disk.io.direction`.
* Rename `system.disk.time` to `system.disk.operation_time`.
* Add descriptions and units to all metric families.
* Add the "utilization" metric to FreeBSD.

16 months agoMerge pull request #4216 from octo/6/cpu
Florian Forster [Mon, 22 Jan 2024 17:28:13 +0000 (18:28 +0100)] 
Merge pull request #4216 from octo/6/cpu

[collectd 6] cpu plugin: Align metrics with OpenTelemetry recommendations.

16 months agocpu plugin: Fix function comment. 4216/head
Florian Forster [Mon, 22 Jan 2024 14:30:38 +0000 (15:30 +0100)] 
cpu plugin: Fix function comment.

Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
16 months agocpu plugin: Improve error checking; define and use `USAGE_UNAVAILABLE`.
Florian Forster [Fri, 19 Jan 2024 20:21:57 +0000 (21:21 +0100)] 
cpu plugin: Improve error checking; define and use `USAGE_UNAVAILABLE`.

16 months agocpu plugin: Improve the description of the `system.cpu.logical.count` metric.
Florian Forster [Fri, 19 Jan 2024 20:15:31 +0000 (21:15 +0100)] 
cpu plugin: Improve the description of the `system.cpu.logical.count` metric.

16 months agocpu plugi: Consistently set the `finalized` field at the end of the function.
Florian Forster [Fri, 19 Jan 2024 20:13:17 +0000 (21:13 +0100)] 
cpu plugi: Consistently set the `finalized` field at the end of the function.

16 months agocpu plugin: Sort CPU states alphabetically.
Florian Forster [Fri, 19 Jan 2024 20:11:57 +0000 (21:11 +0100)] 
cpu plugin: Sort CPU states alphabetically.

16 months agocpu plugin: Add "ReportUsage" to `config_keys`.
Florian Forster [Fri, 19 Jan 2024 20:05:35 +0000 (21:05 +0100)] 
cpu plugin: Add "ReportUsage" to `config_keys`.

Also sort `config_keys`.

16 months agocpu plugin: Apply code review suggestions.
Florian Forster [Fri, 19 Jan 2024 20:01:21 +0000 (21:01 +0100)] 
cpu plugin: Apply code review suggestions.

Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
16 months agocpu plugin: Use a const instead of repeating a literal multiple times.
Florian Forster [Fri, 19 Jan 2024 19:58:25 +0000 (20:58 +0100)] 
cpu plugin: Use a const instead of repeating a literal multiple times.

16 months agocpu plugin: Fold `usage_global_rate` into `usage_rate`.
Florian Forster [Wed, 10 Jan 2024 17:27:10 +0000 (18:27 +0100)] 
cpu plugin: Fold `usage_global_rate` into `usage_rate`.

16 months agocpu plugin: Remove the special "global" case from `usage_ratio`.
Florian Forster [Wed, 10 Jan 2024 17:20:10 +0000 (18:20 +0100)] 
cpu plugin: Remove the special "global" case from `usage_ratio`.

This will just work transparently.

16 months agocpu plugin: Fold the `usage_global_count` function into `usage_count`.
Florian Forster [Wed, 10 Jan 2024 17:17:02 +0000 (18:17 +0100)] 
cpu plugin: Fold the `usage_global_count` function into `usage_count`.

16 months agocpu plugin: Rename `has_value` to `has_rate`.
Florian Forster [Wed, 10 Jan 2024 17:14:32 +0000 (18:14 +0100)] 
cpu plugin: Rename `has_value` to `has_rate`.

This way the use of the field is much easier to understand when reading the
code.

16 months agocpu plugin: Remove tests for `usage_global_ratio` and `usage_global_count`.
Florian Forster [Wed, 10 Jan 2024 16:57:15 +0000 (17:57 +0100)] 
cpu plugin: Remove tests for `usage_global_ratio` and `usage_global_count`.

The functionality is tested in the test cases for `usage_ratio` and
`usage_count` and there is no need to test these separately. The opposite: the
rest of the CPU plugin only uses `usage_ratio` and `usage_count`, so testing
the global variants leaks abstraction.

16 months agocpu plugin: Fold testing for `CPU_ALL` into the tests for `usage_ratio` and `usage_co...
Florian Forster [Wed, 10 Jan 2024 16:56:17 +0000 (17:56 +0100)] 
cpu plugin: Fold testing for `CPU_ALL` into the tests for `usage_ratio` and `usage_count`.

16 months agocpu plugin: Remove unused variable.
Florian Forster [Tue, 9 Jan 2024 23:13:47 +0000 (00:13 +0100)] 
cpu plugin: Remove unused variable.

16 months agocpu plugin: Link the unit test with libstatgrab, if so configured.
Florian Forster [Tue, 9 Jan 2024 20:17:20 +0000 (21:17 +0100)] 
cpu plugin: Link the unit test with libstatgrab, if so configured.

16 months agocpu plugin: Skip states that don't have any data.
Florian Forster [Tue, 9 Jan 2024 12:07:08 +0000 (13:07 +0100)] 
cpu plugin: Skip states that don't have any data.

16 months agocpu plugin: Use the `cpu_num` field in `usage_t`.
Florian Forster [Tue, 9 Jan 2024 12:06:31 +0000 (13:06 +0100)] 
cpu plugin: Use the `cpu_num` field in `usage_t`.

16 months agocpu plugin: Add a `cpu_num` field to `usage_t`.
Florian Forster [Tue, 9 Jan 2024 12:05:50 +0000 (13:05 +0100)] 
cpu plugin: Add a `cpu_num` field to `usage_t`.

16 months agocpu plugin: Update code to use the `usage_t` type.
Florian Forster [Tue, 9 Jan 2024 10:41:49 +0000 (11:41 +0100)] 
cpu plugin: Update code to use the `usage_t` type.

16 months agocpu plugin: Move type definitions close together.
Florian Forster [Tue, 9 Jan 2024 10:03:25 +0000 (11:03 +0100)] 
cpu plugin: Move type definitions close together.

16 months agocpu plugin: Implement `usage_global_count()`.
Florian Forster [Tue, 9 Jan 2024 09:58:25 +0000 (10:58 +0100)] 
cpu plugin: Implement `usage_global_count()`.

16 months agocpu plugin: Implement `usage_count()`.
Florian Forster [Mon, 8 Jan 2024 16:33:43 +0000 (17:33 +0100)] 
cpu plugin: Implement `usage_count()`.

This one is done in a second aggregation loop, because we require a CPU-level
aggregate rate to be available to properly scale the counter.

16 months agocpu plugin: Move aggregation into a central finalize() function.
Florian Forster [Fri, 5 Jan 2024 10:16:23 +0000 (11:16 +0100)] 
cpu plugin: Move aggregation into a central finalize() function.

16 months agocpu plugin: Implement `usage_global_ratio()`.
Florian Forster [Fri, 5 Jan 2024 09:08:46 +0000 (10:08 +0100)] 
cpu plugin: Implement `usage_global_ratio()`.

16 months agocpu plugin: Test that `usage_rate(STATE_ACTIVE)` equals `usage_active_rate()`.
Florian Forster [Fri, 5 Jan 2024 09:08:22 +0000 (10:08 +0100)] 
cpu plugin: Test that `usage_rate(STATE_ACTIVE)` equals `usage_active_rate()`.

16 months agocpu plugin: Implement `usage_ratio`.
Florian Forster [Fri, 5 Jan 2024 08:53:03 +0000 (09:53 +0100)] 
cpu plugin: Implement `usage_ratio`.

16 months agocpu plugin: Add `usage_global_rate`.
Florian Forster [Fri, 5 Jan 2024 08:32:34 +0000 (09:32 +0100)] 
cpu plugin: Add `usage_global_rate`.

16 months agocpu plugin: Aggregate all non-idle states into the "active" state.
Florian Forster [Fri, 5 Jan 2024 07:30:23 +0000 (08:30 +0100)] 
cpu plugin: Aggregate all non-idle states into the "active" state.

16 months agocpu plugin: Ensure unpopulated states return NAN.
Florian Forster [Fri, 5 Jan 2024 07:03:46 +0000 (08:03 +0100)] 
cpu plugin: Ensure unpopulated states return NAN.

16 months agocpu plugin: Add a very simple `usage_t` type for aggregation.
Florian Forster [Fri, 5 Jan 2024 06:59:57 +0000 (07:59 +0100)] 
cpu plugin: Add a very simple `usage_t` type for aggregation.

16 months agocpu plugin: Simplify the configuration options available.
Florian Forster [Thu, 4 Jan 2024 16:58:52 +0000 (17:58 +0100)] 
cpu plugin: Simplify the configuration options available.

 *  The options `ReportUsage`, `ReportUtilization`, and `ReportNumCpu` control
    which metrics are emitted on a high level. Other options no longer influence
    *what* is being collected. This also allows to report usage and utilization
    metrics simultaneously.
 *  The documentation has been updated to reflect that the plugin no longer
    emits a percentage, but a ratio for utilization metrics.

16 months agocpu plugin: Remove overly verbose prefix from "state" constants.
Florian Forster [Thu, 4 Jan 2024 08:46:41 +0000 (09:46 +0100)] 
cpu plugin: Remove overly verbose prefix from "state" constants.

16 months agocpu plugin: Use constants for label names.
Florian Forster [Thu, 4 Jan 2024 05:57:54 +0000 (06:57 +0100)] 
cpu plugin: Use constants for label names.

16 months agocpu plugin: Align metrics with OpenTelemetry recommendations.
Florian Forster [Sun, 17 Dec 2023 13:50:20 +0000 (14:50 +0100)] 
cpu plugin: Align metrics with OpenTelemetry recommendations.

* Add metric description and unit.
* Update label names (e.g. "cpu" → "system.cpu.logical_number")
* Divide rates by number of CPUs, so that the sum of all rates equals to 1.
  (Previously the sum of all rates was equal to the number of logical CPUs)
* Remove the "cpu=total" label when aggregating CPUs.

16 months agoMerge pull request #4239 from eero-t/pkg-config-l0
Florian Forster [Sat, 20 Jan 2024 22:03:51 +0000 (23:03 +0100)] 
Merge pull request #4239 from eero-t/pkg-config-l0

gpu_sysman: enable plugin automatically when `pkg-config` finds `level-zero` dependency

16 months agogpu_sysman: change configure to use pkg-config for dependency 4239/head
Eero Tamminen [Wed, 17 Jan 2024 18:49:20 +0000 (20:49 +0200)] 
gpu_sysman: change configure to use pkg-config for dependency

And enable Sysman plugin automatically when dependency is found.

While GPU plugin uses just Sysman API subset of the Level-Zero API
family, name of the used library / loader is level-zero => dropped
"--with-sysman" option and renamed configure variables.

Also, now that Level-Zero packages are in the distributions, Sysman
API GPU plugin could be enabled by default when pkg-config finds
level-zero. This simplifies config code.

Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
16 months agoMerge pull request #4244 from eero-t/its-history
Florian Forster [Fri, 19 Jan 2024 19:40:35 +0000 (20:40 +0100)] 
Merge pull request #4244 from eero-t/its-history

[collectd 6] remove unused uc_get_history() from src/daemon/utils_cache.c

16 months agosrc/daemon/utils_cache.c: remove unused uc_get_history() 4244/head
Eero Tamminen [Fri, 19 Jan 2024 17:19:39 +0000 (19:19 +0200)] 
src/daemon/utils_cache.c: remove unused uc_get_history()

Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
16 months agoAuto-Merge pull request #4218 from octo/6/df
collectd bot [Fri, 19 Jan 2024 11:25:11 +0000 (12:25 +0100)] 
Auto-Merge pull request #4218 from octo/6/df

Automatically merged due to "Automerge" label

17 months agodf plugin: Add the `ReportUsage` and `ReportUtilization` config options. 4218/head
Florian Forster [Wed, 10 Jan 2024 21:12:31 +0000 (22:12 +0100)] 
df plugin: Add the `ReportUsage` and `ReportUtilization` config options.