[collectd] cpu stats on SMP machines

Florian Forster octo at verplant.org
Sat Sep 19 22:39:23 CEST 2009


Hi Bill,

On Sat, Sep 19, 2009 at 11:22:12AM -0500, Bill Harris wrote:
> I was just curious, is the current cpu plugin limited to values for a
> single cpu (or combined) on a given platform?   I looked at the
> roadmap, but couldn¹t determine if that was in the plans, or already
> exists ( and I don¹t know how to configure it).
> 
> Have recently upgrade an HP Proliant DL580 to 4 cpus (8 cores) and was
> curious.  
> 
> Btw, 4.8 compiles and runs great on that machine with FreeBSD 7.2-R

I haven't checked in a while, but the reason for this is actually
FreeBSD: On FreeBSD information about the CPU usage is read using
sysctlbyname (or sysctl, I'm not quite sure). Other BSDs (dunno which
ones, sorry) provide the {CTL_KERN, KERN_CPTIME2, <num>} MIB, which
returns the CPU counters for the specified CPU <num>. Unfortunately,
FreeBSD doesn't. It only offers the sysctlbyname interface with the
"kern.cp_time" key, which only returns consolidated numbers.

If you find out how to get the values, adding that to the CPU plugin is
probably not much work.

Regards,
—octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090919/ddb1f6ee/attachment.pgp 


More information about the collectd mailing list