Xymon Mailing List Archive search

vmstat graphing with CPU io wait

list Tom Georgoulias
Wed, 26 Jan 2005 11:47:30 -0500
Message-Id: <user-7bd566552d26@xymon.invalid>

Henrik Stoerner wrote:

On Wed, Jan 26, 2005 at 07:44:21AM -0500, Tom Georgoulias wrote:
Are the vmstat patches you created ready for beta testing?  Care to
share them so I can test them out?
I plan on putting out a "release candidate" tomorrow.

There is a beta6-vmstat.patch file on http://www.hswn.dk/beta/
which has the vmstat changes; applies on top of beta-6.
Thanks for providing the patch.  I applied it and it built without any errors, but I'm still having problems getting it to work.  I did copy over the new hobbitgraph.cfg file after installing & deleted the vmstat.rrd for the linux system in question before restarting.

So, my first question:  I was looking at the patch and wasn't sure the array order is correct.  (I'm not a programmer by any means, so if I'm wrong just say so).

on RHEL3, vmstat's CPU info columns are in this order:


user -12th
system - 13th
IO wait - 14th
idle - 15th

For example (pardon the line wrap):

-bash-2.05b$ vmstat 2
procs                      memory      swap          io     system     cpu
  r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy wa id
  0  1      0  19036  27412 4370032    0    0   214     0  622   649  0   1 50 48


in the patch, you have cpu_idl =14 & cpu_wait=15.  Is that backwards? Or am I out of my league (disclaimer:  I hardly know anything about C programming).

static vmstat_layout_t vmstat_linux_layout[] = {
         { 0, "cpu_r" },
         { 1, "cpu_b" },
         { -1, "cpu_w" },        /* Not present for 2.4+ kernels, so log as "Undefined" */
         { 2, "mem_swpd" },
         { 3, "mem_free" },
         { 4, "mem_buff" },
         { 5, "mem_cach" },
         { 6, "mem_si" },
         { 7, "mem_so" },
         { 8, "dsk_bi" },
         { 9, "dsk_bo" },
         { 10, "cpu_int" },
         { 11, "cpu_csw" },
         { 12, "cpu_usr" },
         { 13, "cpu_sys" },
         { 14, "cpu_idl" },
         { 15, "cpu_wait"  },    /* Requires kernel 2.6, but may not be present */
         { -1, NULL }
};