|
Home > Archive > Unix questions > February 2006 > top vs ps Why total cpu is not equal ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
top vs ps Why total cpu is not equal ?
|
|
| javibarroso@gmail.com 2006-02-08, 5:57 pm |
| Hi, could anyone tell me about ps and top behaviour ?
p02:~# top -b | grep Cpu
Cpu(s): 7.1% us, 3.8% sy, 0.0% ni, 84.1% id, 0.9% wa, 0.0% hi,
4.0% si
Cpu(s): 70.1% us, 29.6% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi,
0.3% si
Cpu(s): 70.2% us, 29.8% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi,
0.0% si
Cpu(s): 70.4% us, 29.2% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi,
0.3% si
p02:~# for i in $(seq 1 50) ; do echo -n .; ps auxmh -L | grep -v 0.0
; done ;echo
...................................................
p02:~# top -b | grep Cpu
Cpu(s): 7.1% us, 3.8% sy, 0.0% ni, 84.1% id, 0.9% wa, 0.0% hi,
4.0% si
Cpu(s): 63.3% us, 27.0% sy, 0.0% ni, 9.0% id, 0.3% wa, 0.0% hi,
0.3% si
Cpu(s): 70.1% us, 29.6% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi,
0.3% si
I suppose top is not eating 70 %
How can I know who is eating my cpu ?
Thank you !
Note: I'm on Debian Sarge
| |
| Bill Marcum 2006-02-09, 6:02 pm |
| On 8 Feb 2006 15:46:52 -0800, javibarroso@gmail.com
<javibarroso@gmail.com> wrote:
> Hi, could anyone tell me about ps and top behaviour ?
>
> p02:~# top -b | grep Cpu
> Cpu(s): 7.1% us, 3.8% sy, 0.0% ni, 84.1% id, 0.9% wa, 0.0% hi,
> 4.0% si
> Cpu(s): 70.1% us, 29.6% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi,
> 0.3% si
> Cpu(s): 70.2% us, 29.8% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi,
> 0.0% si
> Cpu(s): 70.4% us, 29.2% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi,
> 0.3% si
> p02:~# for i in $(seq 1 50) ; do echo -n .; ps auxmh -L | grep -v 0.0
> ; done ;echo
> ..................................................
> p02:~# top -b | grep Cpu
> Cpu(s): 7.1% us, 3.8% sy, 0.0% ni, 84.1% id, 0.9% wa, 0.0% hi,
> 4.0% si
> Cpu(s): 63.3% us, 27.0% sy, 0.0% ni, 9.0% id, 0.3% wa, 0.0% hi,
> 0.3% si
> Cpu(s): 70.1% us, 29.6% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi,
> 0.3% si
>
> I suppose top is not eating 70 %
>
70% would be odd, but top can use a significant amount of CPU, depending
on how often it updates.
> How can I know who is eating my cpu ?
>
Use top without the "grep Cpu", so it shows the list of tasks?
--
Don't panic.
|
|
|
|
|