next up previous contents
Next: Install software using RPM Up: Managing processes Previous: How:

Show top CPU processes

We use top to continuously show the processes status, system uptime, processor loading, memory usage, etc. Normally, top doesn't need any command line options. For detailed usage, see the manpage.

e.g. Type top in the shell prompt.

[yuni@lovely-linux yuni]$ top

  3:14pm  up 14 days,  4:40,  6 users,  load average: 0.00, 0.00, 0.00
93 processes: 82 sleeping, 1 running, 0 zombie, 10 stopped
CPU states:  0.3% user,  0.3% system,  0.0% nice, 99.2% idle
Mem:   127088K av,  124300K used,    2788K free,       0K shrd,   39528K buff
Swap:  787176K av,    9536K used,  777640K free                   25852K cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 3050 yuni      15   0  1192 1192   936 R     0.7  0.9   0:01 top
    1 root       7   0   368  368   332 S     0.0  0.2   0:03 init
    2 root       9   0     0    0     0 SW    0.0  0.0   0:00 keventd
    3 root       9   0     0    0     0 SW    0.0  0.0   0:11 kswapd
    4 root       9   0     0    0     0 SW    0.0  0.0   0:00 kreclaimd
    5 root       9   0     0    0     0 SW    0.0  0.0   0:04 bdflush
    6 root       9   0     0    0     0 SW    0.0  0.0   0:00 kupdated

In this example, the system has been up running for 14 days, with 6 users, 93 processes, 82 of which are sleeping, 1 of which is running, 10 are stopped. The total available memory is roughly 128M, nearly all (124300Kb) are used leaving 2788Kb free. The top process (the most CPU-intensive) is top itself, occupying 0.7 % of CPU load.



System Administrator
Thu Jul 26 10:50:59 HKT 2001