[collectd] Graphing rrd output of CPU plugin

lanas lanas at securenet.net
Sun Apr 17 22:13:21 CEST 2011


On Sun, 17 Apr 2011 15:49:41 -0400,
lanas <lanas at securenet.net> wrote :

>   Are there examples around for quickly graphing the out put of some
> plugin modules (such as CPU) without having to use a web server (as
> shown in first steps).  Simply producing a (some) graphic
> file(s) from the files in cpu-0 directory for instance, to get a feel
> about how it works and how collectd resulting data is worked with
> rddtool. 

I've found that rrdtool info must be used first to get some names from
a rrd file set up by collectd.

For instance running rrdtool info on cpu-idle.rrd gives some of the
following:

filename = "cpu-idle.rrd"
rrd_version = "0003"
step = 10
last_update = 1303070546
header_size = 3504
ds[value].index = 0
ds[value].type = "DERIVE"
ds[value].minimal_heartbeat = 20
ds[value].min = 0,0000000000e+00
ds[value].max = NaN
ds[value].last_ds = "396947"
ds[value].value = 5,9940000000e+02
ds[value].unknown_sec = 0

I presume the name 'value' refers to the actual values received from
the system where collectd run as a client (with the cpu module plugin).

A rrdtool fetch command would show the time stamps where values are
found.  These time stamps can be used to narrow a graph.

So now a very simple graph can be made using:

/opt/rrdtool-1.4.5/bin/rrdtool graph cpuidlevalues.png \
  --start 1303068900 --end 1303069810 \
   DEF:cpuidlevalues=cpu-idle.rrd:value:AVERAGE \
   LINE2:cpuidlevalues#FF0000

Maybe all collectd plugins are using the name 'value'.  Or maybe
'rddtool info' has to be run on every rrd file generated by collectd.  I
certainly haven't looked at all documentation, but the cpu plugin
documentation does not seem to mention that the ds-name keyword 'value'
is used.





More information about the collectd mailing list