Patch for really fixing bsnmpd hrProcessorLoad values
uqs at spoerlein.net
Wed Jun 9 10:48:58 UTC 2010
I finally got fed up with bsnmpd no longer returning the right CPU load
values when running under ULE. After taking a look at how top(1) does
it, I came up with the following initial patch to bsnmpd, that seems to
A few technical questions remain:
- Is the idle state guaranteed to always be in the last cp_time column?
- Is handling overflow of kern.cp_times worth it? There's only a 60s
window of reporting wrong stats, better than what we have now anyway.
- Why is kern.cp_times often times *way* longer than hw.ncpu *
CPUSTATES? Is it guaranteed that the first n entries correspond to the
first n*CPUSTATES values in kern.cp_times? Can there be holes?
Patch has been tested on 8-STABLE, 4xCPUs and SCHED_ULE. Other reports
would be very much appreciated.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3869 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20100609/939bebcb/bsnmpd.bin
More information about the freebsd-current