Author Topic: How to use top to measure performance of the core...  (Read 2328 times)

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
How to use top to measure performance of the core...
« on: March 20, 2008, 06:33:53 pm »
Being fairly new to linux, I have been trying to learn more standard commandline tools. Today I have been running top on the core to get an idea of processor usage, etc..  Here is a copy and paste from one of my top sessions:

Code: [Select]
top - 10:29:24 up  2:00,  1 user,  load average: 0.03, 0.15, 0.24
Tasks: 263 total,   1 running, 262 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.8%us,  1.8%sy,  0.0%ni, 96.5%id,  0.0%wa,  0.3%hi,  0.5%si,  0.0%st
Mem:   1933340k total,  1745620k used,   187720k free,   163444k buffers
Swap:  1959888k total,        0k used,  1959888k free,  1011792k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                           
 6236 root      15   0     0    0    0 S    1  0.0   0:04.48 nfsd                                                                                                                                             
 6233 root      15   0     0    0    0 S    0  0.0   0:03.73 nfsd                                                                                                                                             
 6238 root      15   0     0    0    0 S    0  0.0   0:05.10 nfsd                                                                                                                                             
18986 linuxmce  15   0 19216 1468  968 R    0  0.1   0:00.48 top                                                                                                                                               
    1 root      18   0  3964  840  572 S    0  0.0   0:01.65 init                                                                                                                                             
    2 root      10  -5     0    0    0 S    0  0.0   0:00.00 kthreadd                                                                                                                                         
    3 root      RT  -5     0    0    0 S    0  0.0   0:00.07 migration/0                                                                                                                                       
    4 root      34  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0                                                                                                                                       
    5 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/0                                                                                                                                       
    6 root      RT  -5     0    0    0 S    0  0.0   0:00.09 migration/1                                                                                                                                       
    7 root      34  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/1                                                                                                                                       
    8 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/1                                                                                                                                       
    9 root      10  -5     0    0    0 S    0  0.0   0:00.01 events/0                                                                                                                                         
   10 root      10  -5     0    0    0 S    0  0.0   0:00.10 events/1                                                                                                                                         
   11 root      11  -5     0    0    0 S    0  0.0   0:00.00 khelper                                                                                                                                           
   30 root      10  -5     0    0    0 S    0  0.0   0:00.00 kblockd/0                                                                                                                                         
   31 root      10  -5     0    0    0 S    0  0.0   0:00.03 kblockd/1                                                                                                                                         
   32 root      14  -5     0    0    0 S    0  0.0   0:00.00 kacpid                                                                                                                                           
   33 root      14  -5     0    0    0 S    0  0.0   0:00.00 kacpi_notify                                                                                                                                     
  178 root      10  -5     0    0    0 S    0  0.0   0:00.00 kseriod                                                                                                                                           
  213 root      15   0     0    0    0 S    0  0.0   0:00.22 pdflush                                                                                                                                           
  214 root      15   0     0    0    0 S    0  0.0   0:00.00 pdflush                                                                                                                                           
  215 root      11  -5     0    0    0 S    0  0.0   0:00.00 kswapd0                                                                                                                                           
  268 root      11  -5     0    0    0 S    0  0.0   0:00.00 aio/0                                                                                                                                             
  269 root      12  -5     0    0    0 S    0  0.0   0:00.00 aio/1                                                                                                                                             
 2177 root      10  -5     0    0    0 S    0  0.0   0:00.00 ksuspend_usbd                                                                                                                                     
 2178 root      10  -5     0    0    0 S    0  0.0   0:00.00 khubd                                                                                                                                             
 2217 root      10  -5     0    0    0 S    0  0.0   0:00.00 khpsbpkt                                                                                                                                         
 2227 root      10  -5     0    0    0 S    0  0.0   0:00.00 ata/0                                                                                                                                             
 2228 root      10  -5     0    0    0 S    0  0.0   0:00.00 ata/1                                                                                                                                             
 2229 root      20  -5     0    0    0 S    0  0.0   0:00.00 ata_aux                                                                                                                                           
 2326 root      10  -5     0    0    0 S    0  0.0   0:00.00 knodemgrd_0                                                                                                                                       
 2428 root      10  -5     0    0    0 S    0  0.0   0:00.00 scsi_eh_0                                                                                                                                         
 2429 root      10  -5     0    0    0 S    0  0.0   0:00.00 scsi_eh_1                                                                                                                                         
 2523 root      10  -5     0    0    0 S    0  0.0   0:00.00 scsi_eh_2                                                                                                                                         
 2524 root      10  -5     0    0    0 S    0  0.0   0:00.00 scsi_eh_3                                                                                                                                         
 2810 root      10  -5     0    0    0 S    0  0.0   0:02.36 kjournald                                                                                                                                         
 3008 root      11  -4 20188 2016  384 S    0  0.1   0:00.42 udevd                                                                                                                                             
 3613 root      10  -5     0    0    0 S    0  0.0   0:00.32 md1_raid5                                                                                                                                         
 4179 root      12  -5     0    0    0 S    0  0.0   0:00.00 kpsmoused                                                                                                                                         
 4591 dhcp      13  -2 15064  992  472 S    0  0.1   0:00.00 dhclient3                                                                                                                                         
 4612 root      11  -5     0    0    0 S    0  0.0   0:00.00 kjournald                                                                                                                                         
 4795 daemon    15   0  8048  556  432 S    0  0.0   0:00.04 portmap                                                                                                                                           
 4814 statd     24   0 10172  744  612 S    0  0.0   0:00.01 rpc.statd                                                                                                                                         
 4979 root      18   0  3824  572  484 S    0  0.0   0:00.00 getty                                                                                                                                             
 4980 root      18   0  3828  572  484 S    0  0.0   0:00.00 getty                                                                                                                                             
 4982 root      22   0 17536 1596 1216 S    0  0.1   0:00.04 rc                                                                                                                                               
 4985 root      18   0  3824  576  484 S    0  0.0   0:00.00 getty

Does it look normal?
How do I see more pages? (It says there are 263 tasks running, but this one page shows only 40 or so tasks...)
Near the top, what does the "96.5%id" mean? (
Code: [Select]
Cpu(s):  0.8%us,  1.8%sy,  0.0%ni, 96.5%id,  0.0%wa,  0.3%hi,  0.5%si,  0.0%st
)

thanks

Jon

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: How to use top to measure performance of the core...
« Reply #1 on: March 20, 2008, 08:21:32 pm »
The "top" command has quite an extensive manual page, you can access it with the following command:
Code: [Select]
man top
"Change is inevitable. Progress is optional."
-- Anonymous


finsdown

  • Veteran
  • ***
  • Posts: 54
    • View Profile
Re: How to use top to measure performance of the core...
« Reply #2 on: March 20, 2008, 08:35:08 pm »
I suspect that means Idle.  Even when a multi-tasking OS is idle it has to run a process, basically a null process.
"us" would be user processes , "sy" would be system processes.

-fins