[collectd] cpu plugin discuss
Florian Forster
octo at verplant.org
Thu May 1 11:08:40 CEST 2008
Hi Oleg,
first off, thanks for your patches to the CPU and disk plugin.
Unfortunately I didn't have time to look into them yet but I'll do that
the next few days.
I wonder why I didn't implement CPU statistics myself. Could you do me a
favor and find out which version of libstatgrab added the existing
interface to the CPU statistics? I have the suspicion that it's a rather
new addition in which case I would add an appropriate check to the
configure script.
On Thu, May 01, 2008 at 03:24:41AM +0400, Oleg King wrote:
> I have found that cpu plugin has COUNTER type for its storage. On
> FreeBSd, this caused 'strange' values on graphs, like 'idle=133'.
Yes, that's correct, the CPU plugin measures CPU usage in system ticks
(called `Jiffies' under Linux) rather than a percentage.
You can, however, convert those values to percent when drawing the
graph. Just do:
total=idle+user+system+...
idle_percent=100*idle/total
user_percent=100*user/total
system_percent=100*system/total
...
Then graph `*_percent' rather than `*' ;)
> In other hand, libstatgrab can get percents, directly. So we can get
> percents and store percents as GAUGE (or DELIVER, I do not know
> RRDtools enough to make right choice).
I'd be GAUGE.
> What do you think, is this should be made as separate plugin, or as
> configurable choice for existing cpu plugin? Or, may be, just as
> separate RRD file (cpu-percents?) in case libstatgrab is used?
I think we should stick to the existing `cpu' type. Having all operating
systems use the same type makes it much easier to compare two machines
of different type, e. g. a Linux box and a FreeBSD machine..
So my preferred solution would be to update the contrib/collection.cgi
script to display percentages instead of ticks..
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/20080501/82838973/attachment.pgp
More information about the collectd
mailing list