Measuring CPU usage via SNMP

Maxim Khitrov mkhitrov at
Tue May 5 17:39:58 UTC 2009

Hello all,

Simple question - does the sum of differences in ssCpuRawIdle,
ssCpuRawUser, ssCpuRawNice, ssCpuRawKernel, and ssCpuRawInterrupt OIDs
on a FreeBSD 7.2 system give me total CPU allocation (i.e. is a
constant)? I've configured a few scripts to read these values from
bsnmpd, store them via rrdtool, and then generate a single graph with
idle on the negative y axis and everything else stacked on top. I want
to make sure that no other counter is missing from this ensemble and
the ones listed do not overlap. If either of those conditions is not
met, my usage percent calculation will not be accurate.

The OIDs that I left out are:

ssCpuRawSoftIRQ - documentation states that this is for Linux only,
but FreeBSD 7.2 does provide a value for it
ssCpuRawWait - always 0?
ssCpuRawSystem - seems to be a sum of ssCpuRawKernel and ssCpuRawInterrupt

As far as I can tell, these three do not factor into the equation. The
only one I'm not sure about is ssCpuRawSystem. Is there ever a time
when it will not equal to ssCpuRawKernel + ssCpuRawInterrupt?

Thanks for your help,

More information about the freebsd-questions mailing list