System idle time under Linux

Ifrit ifrit at underground
Thu Sep 30 10:19:42 CEST 2010


Hugo Léveillé heeft het volgende neergekrabbeld:

> 
> Thanks, will take a closer look on that
> 
> But to get me started, how would you get, via python, the info from that

>From a unix command prompt use the cat command to view their contents. 
You'll notice that they plain text files with very informative content:

 # cat /proc/stat
cpu  3799492 103198 3546212 82899838 1183162 137849 118698 0 0
cpu0 1071799 22089 1141874 20155255 262512 2714 1704 0 0
cpu1 926425 27349 694583 21016324 302881 2488 4253 0 0
cpu2 938331 29131 736412 21113333 202243 123636 104475 0 0
cpu3 862937 24629 973343 20614926 415526 9011 8266 0 0
intr 153564472 28 10 0 0 0 0 0 7 1 3018879 0 0 173 0 0 0 62 55962320 0 0 0 0 
0 9620148 749 0 0 0 0 0 0 0 0 0 0 3136950 4742352 320982 1 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0
ctxt 478141455
btime 1285609820
processes 45111
procs_running 1
procs_blocked 0
softirq 195073836 0 34148873 30536 22265404 4426357 0 55946604 22390786 
370319 55494957

-- 
Ifrit
http://nl.wikipedia.org/wiki/Ifriet



More information about the Python-list mailing list