Xymon Mailing List Archive search

how to get the CPU max usage info

list Jeremy Laidman
Fri, 13 Dec 2013 11:03:52 +1100
Message-Id: <user-355883dbc4a4@xymon.invalid>

On 12 December 2013 21:18, ROZEK Michal (Prestataire) <
user-b8b95c9a7258@xymon.invalid> wrote:
 In xymon we can see the graph :
<CPU Utilization graph>

 Could You tell me how to get the values of the “% CPU Busy” listed on
the bottom ? I have tried a lot of things but it doesn’t work
The "CPU Utilization" graph with "CPU busy" is defined in graphs.cfg in the
[la1] section.  This shows that the data source is "cpu_idl" in the
vmstat.rrd file.  Note that the graph definition subtracts this "cpu_idl"
(idle percentage) number from 100 to get the busy percentage.

You can get the last few entries of cpu_idl by running:

rrdtool fetch /path/to/vmstat.rrd AVERAGE | tail

The contents of the RRD file come from the [vmstat] section of the client
data messages.  This is typically taken from the output of "vmstat" from
the idle column (normally abbreviated "id").  To get the average idle
percentage over 5 minutes, Xymon runs "vmstat 300 2".  If you want to get
the idle percentage without waiting 5 minutes, you can type "vmstat 5" and
it will repeatedly give 5-second averages forever.  Note that the first
line in the vmstat output is the average of the metrics since last boot.

Cheers
Jeremy