Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Comuting CPU usage from /proc


On 27/09/2004, at 11:53 AM, Carlo Sogono wrote:
The values of load average refers to the average number of
CPUs running for the past 1, 5 and 15 mins and yes, I have
looked at man 5 proc before. Polling the loadavg for the past
min is not so flexible as polling, say, every 1 second so you
can switch states quickly on demand. Your 1 min load *average*
might be <1 but your average for the past few seconds might be
a lot higher and the cpufreq daemon might not be able to
switch immediately and would still have to wait 1 min until
the avg >1.

You can't observe something without changing it's state. The closer you watch your CPU usage, the higher it will be.

Also, the load average numbers give the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5 and 15 minutes. I agree that it's not a great way of gaging actual CPU utilisation.

SNMP might be worth looking at.

TG
--
Tony Green <tgreen@xxxxxxxxxxx>