[collectd] Questions about coding standards & writing plugins

Richard W.M. Jones rjones at redhat.com
Fri Nov 2 17:49:05 CET 2007


Richard W.M. Jones wrote:
> Florian Forster wrote:
>> The CPU plugin, at least under Linux, reports ``Jiffies'', i. e.
>> timeticks that are defined by the `HZ' value in the kernel, usually
>> either 1/100th, 1/250th or 1/1000th of a second. So the values should be
>> seen in relation to each other anyways, so if for example `system' is
>> 25, `user' is 150 and `idle' is 75, you'd get 10%, 60% and 30%
>> respectively.
> 
> So the nanosecond figure comes from the Xen hypervisor which is a layer 
> sitting under the Linux kernel (or in fact kernels because usually you 
> are running a "dom0" management domain and a number of "domU" guests). I 
> will ask our hypervisor experts here how accurate the number really is.  
> Then I can decide whether to scale it to jiffies or just leave it.

I just got a reply and in fact the nanoseconds figure is scaled up from 
the CPU's TSC, so it should be quite accurate.

Rich.

-- 
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20071102/3de7aabe/attachment.bin 


More information about the collectd mailing list