vmstat inconsistency on Linux

Charles Goyard cgoyard at cvf.fr
Fri Feb 23 16:23:52 CET 2007


Hi all,

Hobbit is a amazing software, but it has a small painful misbehaviour
regarding vmstat on Linux :

I have a lot of hosts with several different flavors of Linux. Every now
and then in the history of procps, the output of vmstat changes. That
sucks but it's there. The way hobbit handles vmstat data does not work
well. Basically, it try to guess the format of vmstat from the kernel
version or OS flavour (on RHEL, the format changes when you switch from
3.1 to 3.2 !).

So, only the version of vmstat matters.

* vmstat version 2.0.6 looks like this :
   procs                      memory    swap          io     system  cpu
 r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us sy  id
 0  1  0   7520  13236  31856 386296   3   0     3     2    5     1   1 4   2

* vmstat version 3.2.7 looks like this :
procs -----------memory---------- ---swap-- -----io---- -system------cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0   7520  14028  30544 386980    3    0     3     2    5    1 83 15 2  0

The two above commands where launched on the same machine, a Debian 2.2
with a 2.4.31 kernel.

On an older kernel (2.2.25, ouch), vmstat 2.0.6 has the same output, and
vmstat 3.2.7 just says "FATAL: kernel too old".

I suggest the hobbit client returns the procps version (vmstat -V), and
the server chooses the layout from that information.


Regards,

-- 
Charles Goyard - cgoyard at cvf.fr - (+33) 1 45 38 01 31



More information about the Xymon mailing list