[hobbit] vmstat graphing with CPU io wait
henrik at hswn.dk
Mon Jan 24 23:06:31 CET 2005
In <41F53C34.4080008 at nandomedia.com> Tom Georgoulias <tgeorgoulias at nandomedia.com> writes:
>My old BB setup has a customized vmstat-larrd.pl script which allows for
> variations in vmstat output based on the version of procps. In other
>words, it compensates for the fact that RHEL3 and old red hat linux
>systems have vmstat output who's column ordering doesn't match up.
Hobbit knows these two layouts of the vmstat data as "linux" and
"debian3", the latter being the one for the older linux versions
(essentially, systems running vmstat for a Linux 2.2 kernel).
>So I'd like to bring some of those vmstat changes into my new hobbit
>setup, most notably the ability to plot CPU wait for IO (wa) alongside
>user, system & idle time, but poking around in hobbitgraph.cfg doesn't
>reveal an easy way to do it.
>Any tips on how I might accomplish this?
As with LARRD, there are two steps: Collecting the data, and
Data collection is handled by hobbitd_larrd. The interesting stuff
here is in hobbitd/do_larrd.c, and hobbitd/larrd/*.c . do_larrd.c
determines which function should parse an incoming status or data
message, by looking at the name of the "status" or "data" name.
It also consults the LARRDS environment variable, e.g. to figure out
that "ftp" is handled by the "tcp" parser. Each type of RRD file then
has it's own little routine in one of the hobbitd/larrd/*.c files to
pick out the interesting data, and put it into the RRD file.
Where do you get the I/O wait information from ?
Data display is handled by hobbitgraph.cgi, and the config file
hobbitgraph.cfg. This is very similar to the looong set of
definitions in larrd-grapher.cgi, except that you need not worry about
hostnames in the RRD files, because Hobbit keeps all RRD files for a
given host in a separate directory. So e.g. the "vmstat" graph can
just get the CPU idle-time value with
i.e. grab the "vmstat.rrd" file, and extract the current average value
of the "cpu_idl" dataset.
You can mix values from different RRD files in the same graph,
e.g. the "vmstat2" graph uses both the "vmstat.rrd" file and the
If you have more questions, please ask. And if you have something that
could be of interest to others, I'll be happy to include it with
More information about the Xymon