[mrtg] Need help on CPU info collection
s.shipway at auckland.ac.nz
Wed Sep 3 01:04:18 CEST 2008
Let me guess - you're storing and displaying just zeros, right?
You need to read up on the difference between a COUNTER (the default MRTG mode) and a GAUGE.
A COUNTER is a total count, such as with network traffic. Here, you want to graph the RATE OF CHANGE of the value.
A GAUGE is an absolute value. Here, you want to graph the UNMODIFIED VALUE.
Since a CPU usage is a gauge (IE, it is not a constantly increasing count, such as with network bytes transmitted) you need to add the 'gauge' option, otherwise you will graph the rate of change, which will usually be zero. You can think of the CPU usage OID as a 'number of seconds CPU time used per second', IE a rate. Since it is already a rate, you do not want the default 'counter' mode.
Similarly, with a memory value, you will probably want the 'gauge' option.
If (for example) you were monitoring a count of total pages printed by a printer, then this would be a 'counter' and you'd want to see the rate of change instead.
Summary: always add the gauge option, unless you're sure the value you are retrieving is a constantly increasing count rather than a rate.
You probably want to add the 'noo' option as well to suppress the second line.
If you're using routers2 as your frontend, also add the extended options 'fixunit' and 'nototal'. It will help the display look better for small values.
Target[cluster1.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:public at 172.16.6.183<mailto:public at 172.16.6.183> + ssCpuRawSystem.0&ssCpuRawSystem.0:public at 172.16.6.183<mailto:public at 172.16.6.183> + ssCpuRawNice.0&ssCpuRawNice.0:public at 172.16.6.183<mailto:public at 172.16.6.183>
Title[cluster1.cpu]: Server CPU Load
PageTop[cluster1.cpu]: <H1>CPU Load For Cluster1- System, User and Nice Processes</H1>
YLegend[cluster1.cpu]: CPU Utilization
Legend1[cluster1.cpu]: Current CPU percentage load
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mrtg