Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

cpu activity



Actually, I've answered my own question... The basic info
is under

/proc/stat

[adler at master adler]$ cat /proc/stat
cpu  3256169 84027 146187 6083842
cpu0 3256169 84027 146187 6083842
page 721666 1219861
swap 8492 30127
intr 24254489 9570225 22962 0 4 4 0 4 2 1 6349852 0 6480174 865931 0
204602 760728
disk_io: (3,0):(204788,67727,1441650,137061,2439622)
(8,0):(37,29,450,8,72)
ctxt 149799837
btime 1069267490
processes 18136

The cpu and cpu0 have the pertinent info which top
displays.

Cheers. Steve.

On Thu, 2003-11-20 at 15:55, David Kramer wrote:
> On Thu, 20 Nov 2003, Stephen Adler wrote:
> 
> > I'm thinking of writing a quick and dirty routine which
> > gets the total cpu activity which top reports. I was
> > wondering if there was a field under the /proc file system
> > which reports system,user, idle cpu activity or if there
> > is a system call which returns this.
> > 
> > Cheers. Steve.
> 
> /proc/loadavg
> though I don't know much about it, that's the most likely candidate.





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org