how to get cpu states more than once a second?

Valentin Nechayev netch at ivb.nn.kiev.ua
Sun Mar 7 07:38:44 PST 2004


 Wed, Mar 03, 2004 at 07:27:31, ticso (Bernd Walter) wrote about "how to get cpu states more than once a second?": 

BW> Currently I get the states via kern.cp_time, but this only allows
BW> a granularity of a single second and I need something around 50-100ms.
BW> Application is a LED bargraph which doesn't have the intended effect
BW> with just a single update per second.

Real granularity for its is statclock rate (on x86, usually 128 or 1024).
But one should know that short period states are too inexact; there is
interferention between periodic states and statclock rate which can lead
to temporary distortions; e.g. inadequately high interrupt time reporting
during 1-2 seconds.



-netch-


More information about the freebsd-hackers mailing list