Retrieving CPU steal time
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 19 May 2023 17:29:37 UTC
Moin, I took it upon myself to improve FreeBSD support for x11/polybar (a status bar thingy). Out-of-the-box, displaying the CPU load is not supported on FreeBSD. Upstream defines this structure for recording CPU load: https://github.com/polybar/polybar/blob/master/include/modules/cpu.hpp#L11 I've turned to the kern.cp_time(s) sysctl to retrieve the CPU load. This provides me with the fields for user, nice, system and idle. However, I'm not sure what to do about the 'steal' time which Linux uses to report CPU time spent in virtual environments. Is there an equivalent on FreeBSD? Best regards, ~ jbo