[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting CPU load (from /proc/?)



> Right.  But those are *average* values.  I'd like to be able to read
> real-time CPU load info.  For instance, if I run a CPU-intensive
> process, the value in /proc/loadavg will change very slowly.  I need
> to be able to read that CPU is 100% busy at least one second after
> this happens.

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 the time. Maybe a second is not
long enough to say anything interesting. -chris



Reply to: