| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Fix incorrect data types for FreeBSD `vm.stats.*` counters. All `vm.stats.` counters are defined as `counter_u64_t` (64-bit) in the FreeBSD kernel, but the Netdata FreeBSD plugin was reading them as `u_int` (32-bit). This work was sponsored by [OVHcloud](https://www.ovhcloud.com).
Sorry, something went wrong.
There was a problem hiding this comment.
This PR fixes FreeBSD vm.stats.* sysctl counter reads in freebsd.plugin by using 64-bit types so they match the kernel’s 64-bit counter storage and avoid size-mismatch failures/inaccurate readings.
Changes:
src/collectors/freebsd.plugin/freebsd_sysctl.c:690
uint64_t soft_intr_number;
if (unlikely(GETSYSCTL_SIMPLE("vm.stats.sys.v_soft", mib, soft_intr_number))) {
collector_error("DISABLED: system.dev_intr chart");
collector_error("DISABLED: vm.stats.sys.v_soft module");
src/collectors/freebsd.plugin/freebsd_sysctl.c:772
uint64_t forks_number;
if (unlikely(GETSYSCTL_SIMPLE("vm.stats.vm.v_forks", mib, forks_number))) {
collector_error("DISABLED: system.forks chart");
collector_error("DISABLED: vm.stats.sys.v_swtch module");
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
|
@DavidMarec, thanks! See the CLA. We'll need it to be signed before we can merge the PR. |
Sorry, something went wrong.
it's signed for. |
Sorry, something went wrong.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Fix incorrect data types for FreeBSD vm.stats.* counters. All vm.stats. counters are defined as counter_u64_t (64-bit) in the FreeBSD kernel, but the Netdata FreeBSD plugin was reading them as u_int (32-bit).
Test Plan
NetData outputs tested on one FreeBSD 15 machine.
Additional Information
This work was sponsored by OVHcloud.
Summary by cubic
Read FreeBSD vm.stats.* counters as 64-bit (uint64_t) in the plugin to match kernel counter_u64_t. Fixes truncation and inaccurate values for interrupts (v_intr), soft interrupts (v_soft), context switches (v_swtch), and forks (v_forks).
Written for commit 2defc73. Summary will update on new commits.