[mrtg] MRTG problem with calculation of CPU Usage under Linux

Stephan Faulmann pc-guru86 at web.de
Wed Sep 1 13:51:34 CEST 2010

Please excuse the double posting, I have seen that the posting before was not readable very well, because of the html-format...

Hello everybody,

I have a problem, which is a little bit complicated to explain, but I hope it is understandable...

I want to graph the CPU Usage of a 4-CPU Linux-Server. Typically I would use the ssCpuIdle.0 to do so, but in my Linux-Version this vlaue is always 93, so I had to find an other way to do so.
On the Internet, I found a formula to calculate the cpu usage by using ssCpuRawIdle, ssCpuRawSystem, ssCpuRawNice and ssCpuRawUser. I transformed the formula into MRTG and looked at the graphs. Firstly I was wondering, why this is always the same value, but now it is clear: MRTG calculates the given values resulting in the average load since last clearing of the counters...

In my opinion I (or better MRTG) would have to calculate the valuechanges within the interval of each value and then use the formula. But I don't know how to do so.

Here is the Target formula I use:

100 - ((100 * at / ( at + at + at + at

I am using MRTG with RRDtool.

Thanks for your help.

WEB.DE DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für 
nur 19,99 €/mtl.!* http://web.de/DSL-Doppel-Flatrate/

More information about the mrtg mailing list