[mrtg] CPU: Active vs idle

Steve Shipway s.shipway at auckland.ac.nz
Tue Apr 7 14:09:50 CEST 2009


You could do this, but it would be unreliable and inacurate.

The ssCpuRaw*.0 counters count seconds used, so are only meaningful in a rate-of-change context.  Find the change over a 5-min period, divide by 300 and multiply by 100 and you've a percentage.  The overall sum could be anything; you could work out rate of change, but it might confuse MRTG on counter rollover.

User + System + Idle == 100% on windows IIRC
Nice shows you the low-priority task usage.
Unix systems also have 'wait' which is time spent waiting on IO, in these cases you have instead
User + System + Wait + Idle == 100%

If you are using MRTG/RRD with Routers2, I'd suggest you take a look at the host temlpates available on steveshipway.org/forum which generate separate targets for each component, then make a stacked graph of the whole set (apart from Idle which is useless as the total is always 100)

When polling multiple targets that should add to 100% like this you can get a slight race condidtion, though, so super-busy machines may end up with values that total a little more than 100.  We get around this with a complex caching system that polls all at once.

Steve

________________________________________
From: mrtg-bounces at lists.oetiker.ch [mrtg-bounces at lists.oetiker.ch] On Behalf Of Tasslehoff Burrfoot [tasslehoff at burrfoot.it]
Sent: Monday, 6 April 2009 7:10 a.m.
To: mrtg at lists.oetiker.ch
Subject: [mrtg] CPU: Active vs idle

Hi all this is my first post on this list.
I want to ask a questione about monitor active CPU against idle CPU.

Around the net I found many examples about user cpu vs idle cpu, or
every other single cpu value against idle cpu, but nothing about the sum
of all these values (ssCpuRawUser+ssCpuRawSystem+ssCpuRawNice) vs
ssCpuRawIdle.

I tried something like this but without success:
(Target[cpu]:ssCpuRawUser.0&ssCpuRawIdle.0:public at server +
ssCpuRawSystem.0&ssCpuRawIdle.0:public at server +
ssCpuRawNice.0&ssCpuRawIdle.0:public at server)

Is It possibile?

Thanks

Tasslehoff Burrfoot

_______________________________________________
mrtg mailing list
mrtg at lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg



More information about the mrtg mailing list