Re: Getting CPU load (from /proc/?)
At 04:39 PM 9/27/00 +0100, you wrote:
Arcady Genkin <firstname.lastname@example.org> wrote:
>How would I get a real-time CPU load information? I found
>/proc/loadavg, but that's not what I need, since it only gives average
You could try 'vmstat 1', which will poll every second. Ignoring the
first line, which is an "up to the time vmstat was started" figure, the
last field in each line is the percentage of time the CPU is idle.
I can't speak for how accurate it is, but it seems to be fairly
Rememebr heisenberg's uncertanty principle - you can't measure an attribute
of the system without affecting the system attribute you are measuring.
Running vmstat means there is a running process - which means the machine
might never be idle enough to suspend
Just chucking a crescent in the gears :)