cancel
Showing results for 
Search instead for 
Did you mean: 

Query on TOP command

 
Highlighted
Honored Contributor

Query on TOP command

Here is my Top output:
====================
System: butthead Tue Mar 11 00:15:38 2008

Load averages: 0.14, 0.05, 0.06
123 processes: 117 sleeping, 6 running
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.23 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
1 0.04 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.14 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%

Memory: 95124K (60316K) real, 135996K (87856K) virtual, 1635308K free Page# 1
/12

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAN
D
0 ? 35 root 152 20 1888K 1888K run 38:44 0.31 0.31 vxfsd
0 pts/tb 13676 avinash 178 20 2772K 476K run 0:09 0.12 0.12 top
1 ? 1328 root 152 20 14656K 2772K run 0:57 0.10 0.10 samd
1 ? 1192 root -16 20 18928K 5224K run 72:36 0.10 0.10 midaem
0 ? 1416 root 154 20 14336K 1900K sleep 32:49 0.06 0.06 alarmg
1 ? 1468 root 158 10 2392K 212K sleep 9:23 0.05 0.05 cclogd
0 ? 391 root 152 20 1936K 308K run 2:41 0.04 0.04 syncer
1 ? 1471 root 154 10 4528K 920K sleep 41:49 0.03 0.03 psmct


>> Here above I could see the %IDLE is 100, but some of my processes are still utilizing the CPU(%CPU for each process). When I calculate for the running process, I could find the %CPU is around 10 % but %IDLE shows 100%.

Why there is so much differance
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
3 REPLIES 3
Highlighted
New Member

Re: Query on TOP command

Hi avinash,
Top is considered to be an tool for user to know whats going on regarding the processes, memory or others but its not the exact calculations. Never takes the top as exact measurement.
Please try to run vmstat or iostat or other OS specific commands to calculate?
Highlighted
Acclaimed Contributor

Re: Query on TOP command

>but some of my processes are still utilizing the CPU (%CPU for each process).

Which process? You need to point to it.
If you are talking about vxfsd, the number .031 says it is the average over some time period. If a process was running at 100%, it takes awhile to decay. Whereas the CPU numbers are instantaneous.

And of course what inukoti13 said.
Highlighted
Honored Contributor

Re: Query on TOP command

Use other tools like Glance, measureware
"Light travels faster than sound. That's why some people appear bright until you hear them speak."