[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 * 1.3.6.1.4.1.2021.11.53.0&1.3.6.1.4.1.2021.11.53.0:public at 123.123.123.123) / (1.3.6.1.4.1.2021.11.53.0&1.3.6.1.4.1.2021.11.53.0:public at 123.123.123.123 + 1.3.6.1.4.1.2021.11.52.0&1.3.6.1.4.1.2021.11.52.0:public at 123.123.123.123 + 1.3.6.1.4.1.2021.11.51.0&1.3.6.1.4.1.2021.11.51.0:public at 123.123.123.123 + 1.3.6.1.4.1.2021.11.50.0&1.3.6.1.4.1.2021.11.50.0:public at 123.123.123.123))

I am using MRTG with RRDtool.

Thanks for your help.

Stephan
___________________________________________________________
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