Re: Getting CPU load (from /proc/?)
On Tue, 26 Sep 2000, Krzys Majewski wrote:
> This is just a guess, but maybe you can't. Maybe the cpu is either
> 100% busy or 0% busy, depending on whether or not linux is running a
> program. After a minute, you can say, OK, a program was running 20% of
It's a good guess. In technical terms the load average is simply the
average number of processes in the runnable state over a period of time.
You could take an instantaneous measurement of the number of processes in
the runnable state, but it wouldn't be a meaningful number. (In fact,
this information is already produced by ps - running processes are marked
with 'R'). It's entirely possible that a lightly loaded system could have
many running processes at any particular moment, or that a heavily loaded
system could have few.
> the time. Maybe a second is not long enough to say anything
> interesting. -chris
It depends on what information you are really trying to get. :}
Reply to: