node_exporter icon indicating copy to clipboard operation
node_exporter copied to clipboard

Extension of the CPU collector for NetBSD

Open MatthiasPetermann opened this issue 2 years ago • 0 comments

Based on cpu_freebsd.go I extended the CPU collector so that it is also useful for NetBSD. At the moment it supports CPU times (analogous to the FreeBSD collector via sysctl calls divided by mode), as well as CPU core temperatures on an experimental basis. The core temperatures depend at the moment on the call of a binary from the NetBSD base system (envstat). I'm not quite happy with this yet - the overhead to start a process and parse the XML proplist is certainly measurable and then again has influence on the overall load. An alternative would be low level calls / ioctls to the envsys subsystem. But here I have to familiarize myself first. If you think it would be ok to merge the extension in its current form, that would be a welcome addition for NetBSD users already. In case of doubt, the collector can be switched off via command line, and the extension has no influence on the binaries for other systems than NetBSD. I would also appreciate any comments or suggestions.

Kind regard Matthias

MatthiasPetermann avatar Sep 17 '22 14:09 MatthiasPetermann