[mrtg] Need help on CPU info collection

Steve Shipway 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<mailto:public at> + ssCpuRawSystem.0&ssCpuRawSystem.0:public at<mailto:public at> + ssCpuRawNice.0&ssCpuRawNice.0:public at<mailto:public at>
          Title[cluster1.cpu]: Server CPU Load
          PageTop[cluster1.cpu]: <H1>CPU Load For Cluster1- System, User and Nice Processes</H1>
          MaxBytes[cluster1.cpu]: 100
          ShortLegend[cluster1.cpu]: %
          YLegend[cluster1.cpu]: CPU Utilization
          Legend1[cluster1.cpu]: Current CPU percentage load
          LegendI[cluster1.cpu]: Used
          Options[cluster1.cpu]: growright,nopercent
          Unscaled[cluster1.cpu]: ymwd

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20080903/bfa589ba/attachment.html 

More information about the mrtg mailing list