Retrieving CPU steal time

From: <jbo_at_insane.engineer>
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