[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch to support new "st" vmstat field in RHEL5
- To: hobbit mailing list <hobbit (at) hswn.dk>
- Subject: patch to support new "st" vmstat field in RHEL5
- From: Tom Georgoulias <tomg (at) mcclatchyinteractive.com>
- Date: Tue, 04 Sep 2007 09:50:29 -0400
- Organization: McClatchy Interactive
- User-agent: Thunderbird 2.0.0.5 (X11/20070719)
Red Hat Enterprise Linux 5 adds support for a 17th field in vmstat: "st"
or %CPU stolen from a virtual machine. I'm using procps-3.2.7-8.1.el5,
the latest production procps from Red Hat Network. I made a simple one
line patch that adds this field to the default Linux OS layout, rather
than create OS classes for the two linux distros that I know are
supporting it (RHEL5 and Fedora 7). I'm guessing that this patch will
collect and display a lot of NaN data for some distros, but I thought
I'd pass it along. If there is a better way to handle this, let me know.
Tom
--
Tom Georgoulias
Sr. Systems Engineer
McClatchy Interactive
tomg (at) mcclatchyinteractive.com
diff -up hobbitd/rrd/do_vmstat.c.orig hobbitd/rrd/do_vmstat.c
--- hobbitd/rrd/do_vmstat.c.orig 2007-07-24 04:44:52.000000000 -0400
+++ hobbitd/rrd/do_vmstat.c 2007-09-04 09:31:15.000000000 -0400
@@ -229,6 +229,7 @@ static vmstat_layout_t vmstat_linux_layo
{ 13, "cpu_sys" },
{ 14, "cpu_idl" },
{ 15, "cpu_wait" }, /* Requires kernel 2.6, but may not be present */
+ { 16, "cpu_st" }, /* Requires kernel 2.6.11, also may not be present */
{ -1, NULL }
};