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

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



Arcady Genkin <antipode@thpoon.com> writes:
AG> How would I get a real-time CPU load information?  I found
AG> /proc/loadavg, but that's not what I need, since it only gives average
AG> load values.

My /proc/loadavg looks like

        0.04 0.06 0.07 3/56 959

The first three numbers are the average load over the past 1, 5, and
15 minutes, as is reported by 'uptime' and what not.  "3/56" means
that three processes are currently running, out of 56 total.  "959" is 
the pid of the last process to run, here corresponding to a 'cat'
process.

-- 
David Maze             dmaze@mit.edu          http://www.mit.edu/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: