- Feb 7, 2001
- 1,637
- 0
- 0
Aight, so looking at the output of the 'top' command at a terminal, I see something like what follows.
Now, I'd assume that the CPU percentage idle ( 98.3% ) would be equal to 100% - the sum of the CPU usage of all of the running processes... However, this is obviously not the case. Can someone explain to me:
a) why not?
b) how can I really tell the CPU usage of the machine? 100 - the sum or what it says for idle?
last pid: 59111; load averages: 0.26, 0.32, 0.44 up 120+07:56:30 15:38:32
82 processes: 82 sleeping
CPU states: 1.4% user, 0.0% nice, 0.4% system, 0.0% interrupt, 98.3% idle
Mem: 309M Active, 392M Inact, 180M Wired, 37M Cache, 112M Buf, 84M Free
Swap: 2032M Total, 72K Used, 2032M Free
PID UID PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND
50520 88 2 0 359M 106M poll 1 436:44 12.50% 12.50% mysqld
59095 1001 18 0 16752K 15672K lockf 0 0:03 7.43% 6.79% perl
6980 80 10 0 22748K 11076K nanslp 1 106:19 1.71% 1.71% httpd
6971 80 2 0 22524K 10872K sbwait 0 79:31 0.54% 0.54% httpd
59036 125 18 0 1932K 1304K lockf 1 0:01 0.49% 0.49% cleanup
59039 125 2 0 1932K 1304K select 1 0:01 0.49% 0.49% cleanup
6982 80 2 0 22500K 10828K sbwait 0 104:27 0.10% 0.10% httpd
Now, I'd assume that the CPU percentage idle ( 98.3% ) would be equal to 100% - the sum of the CPU usage of all of the running processes... However, this is obviously not the case. Can someone explain to me:
a) why not?
b) how can I really tell the CPU usage of the machine? 100 - the sum or what it says for idle?
last pid: 59111; load averages: 0.26, 0.32, 0.44 up 120+07:56:30 15:38:32
82 processes: 82 sleeping
CPU states: 1.4% user, 0.0% nice, 0.4% system, 0.0% interrupt, 98.3% idle
Mem: 309M Active, 392M Inact, 180M Wired, 37M Cache, 112M Buf, 84M Free
Swap: 2032M Total, 72K Used, 2032M Free
PID UID PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND
50520 88 2 0 359M 106M poll 1 436:44 12.50% 12.50% mysqld
59095 1001 18 0 16752K 15672K lockf 0 0:03 7.43% 6.79% perl
6980 80 10 0 22748K 11076K nanslp 1 106:19 1.71% 1.71% httpd
6971 80 2 0 22524K 10872K sbwait 0 79:31 0.54% 0.54% httpd
59036 125 18 0 1932K 1304K lockf 1 0:01 0.49% 0.49% cleanup
59039 125 2 0 1932K 1304K select 1 0:01 0.49% 0.49% cleanup
6982 80 2 0 22500K 10828K sbwait 0 104:27 0.10% 0.10% httpd