BSD风格和SysV风格

BSD风格:
a:所有与终端有关的进程
u:显示进程是由哪个用户启动的
x:所有与终端无关的进程,但不全是,所以通常和a一起使用
举例:
[root@ns1 ~]# ps ax | head -5
  PID TTY      STAT   TIME COMMAND
1 ?        Ss     0:01 /sbin/init
2 ?        S      0:00 [kthreadd]
3 ?        S      0:00 [migration/0]
4 ?        S      0:00 [ksoftirqd/0]
[root@ns1 ~]# ps aux | head -5
USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root          1  0.0  0.1  19348  1556 ?        Ss   Apr23   0:01 /sbin/init
root          2  0.0  0.0      0     0 ?        S    Apr23   0:00 [kthreadd]
root          3  0.0  0.0      0     0 ?        S    Apr23   0:00 [migration/0]
root          4  0.0  0.0      0     0 ?        S    Apr23   0:00 [ksoftirqd/0]
备注:PID:进程编号
 TTY:所关联到的终端,其中的?表示与终端无关
 STAT:表示进程状态
D:不可终端的睡眠
R:运行或就绪
S:可终端的睡眠
T:停止
Z:将死
<:高优先级进程
N:低优先级进程
+:前台进程组中的进程
比如启动一个bash,在这之下可以启动多个进程,这些进程同属一个终端;
而前台进程就是从命令行输入的进程,和当前终端相关的。
l:多线程进程
s:会话进程首进程
[root@ns1 ~]# pstree
init─┬─abrtd
├─acpid
├─atd
├─auditd───{auditd}
├─automount───4*[{automount}]
├─certmonger
├─crond
├─cupsd
├─dbus-daemon
├─hald─┬─hald-runner─┬─hald-addon-acpi
│      │             └─hald-addon-inpu
│      └─{hald}
├─master─┬─pickup
│        └─qmgr
├─mcelog
├─6*[mingetty]
├─rpc.statd
├─rpcbind
├─rsyslogd───3*[{rsyslogd}]
├─sshd───sshd───bash───pstree
└─udevd───udevd
[root@ns1 ~]# 
TIME:真正占据CPU的运行时长,而不是挂表时长
COMMAND:运行的命令
显示结果中如果加[]代表是内核线程,而不是用户进程
[root@ns1 ~]# ps aux | grep "bash"
root       1839  0.0  0.1 108324  1904 pts/0    Ss   Apr23   0:00 -bash
root      25531  0.0  0.0 103344   844 pts/0    S+   00:23   0:00 grep bash
[root@ns1 ~]# 
SysV风格
e:显示所有进程
l:长格式显示
F:额外的完整格式(更多字段)
常用组合:
-elF
-ef
-eF
举例:
[root@ns1 ~]# ps -e
  PID TTY          TIME CMD
1 ?        00:00:01 init
2 ?        00:00:00 kthreadd
3 ?        00:00:00 migration/0
4 ?        00:00:00 ksoftirqd/0
5 ?        00:00:00 stopper/0
6 ?        00:00:00 watchdog/0
7 ?        00:00:22 events/0
8 ?        00:00:00 events/0
9 ?        00:00:00 events_long/0
10 ?        00:00:00 events_power_ef
11 ?        00:00:00 cgroup
12 ?        00:00:00 khelper
13 ?        00:00:00 netns
14 ?        00:00:00 async/mgr
15 ?        00:00:00 pm
16 ?        00:00:00 sync_supers
17 ?        00:00:00 bdi-default
18 ?        00:00:00 kintegrityd/0
19 ?        00:00:02 kblockd/0
20 ?        00:00:00 kacpid
21 ?        00:00:00 kacpi_notify
22 ?        00:00:00 kacpi_hotplug
23 ?        00:00:00 ata_aux
24 ?        00:00:00 ata_sff/0
25 ?        00:00:00 ksuspend_usbd
26 ?        00:00:00 khubd
27 ?        00:00:00 kseriod
28 ?        00:00:00 md/0
29 ?        00:00:00 md_misc/0
30 ?        00:00:00 linkwatch
32 ?        00:00:00 khungtaskd
33 ?        00:00:00 kswapd0
34 ?        00:00:00 ksmd
35 ?        00:00:00 khugepaged
36 ?        00:00:00 aio/0
37 ?        00:00:00 crypto/0
44 ?        00:00:00 kthrotld/0
45 ?        00:00:00 pciehpd
47 ?        00:00:00 kpsmoused
48 ?        00:00:00 usbhid_resumer
49 ?        00:00:00 deferwq
81 ?        00:00:00 kdmremove
82 ?        00:00:00 kstriped
  113 ?        00:00:00 ttm_swap
  245 ?        00:00:00 scsi_eh_0
  248 ?        00:00:00 scsi_eh_1
  259 ?        00:00:01 mpt_poll_0
  260 ?        00:00:00 mpt/0
  261 ?        00:00:00 scsi_eh_2
  417 ?        00:00:01 jbd2/sda3-8
  418 ?        00:00:00 ext4-dio-unwrit
  511 ?        00:00:00 flush-8:0
  515 ?        00:00:00 udevd
  652 ?        00:00:01 vmmemctl
  812 ?        00:00:00 udevd
  817 ?        00:00:00 kdmflush
  850 ?        00:00:00 jbd2/sda1-8
  851 ?        00:00:00 ext4-dio-unwrit
  854 ?        00:00:00 kjournald
  897 ?        00:00:00 kauditd
  956 ?        00:00:00 ib_addr
  961 ?        00:00:00 infiniband/0
  970 ?        00:00:00 ib_mcast
  975 ?        00:00:00 iw_cm_wq
  980 ?        00:00:00 ib_cm/0
  985 ?        00:00:00 rdma_cm
 1006 ?        00:00:00 ipoib_flush
 1224 ?        00:00:00 auditd
 1258 ?        00:00:00 rsyslogd
 1309 ?        00:00:00 rpcbind
 1331 ?        00:00:00 rpc.statd
 1366 ?        00:00:00 dbus-daemon
 1387 ?        00:00:00 cupsd
 1419 ?        00:00:00 acpid
 1431 ?        00:00:00 hald
 1432 ?        00:00:00 hald-runner
 1464 ?        00:00:00 hald-addon-inpu
 1482 ?        00:00:00 hald-addon-acpi
 1506 ?        00:00:01 automount
 1554 ?        00:00:00 mcelog
 1571 ?        00:00:00 sshd
 1650 ?        00:00:00 master
 1657 ?        00:00:00 qmgr
 1664 ?        00:00:00 abrtd
 1691 ?        00:00:00 crond
 1706 ?        00:00:00 atd
 1722 ?        00:00:00 certmonger
 1761 tty1     00:00:00 mingetty
 1764 tty2     00:00:00 mingetty
 1769 tty3     00:00:00 mingetty
 1773 tty4     00:00:00 mingetty
 1775 tty5     00:00:00 mingetty
 1778 tty6     00:00:00 mingetty
 1837 ?        00:00:00 sshd
 1839 pts/0    00:00:00 bash
25276 ?        00:00:00 pickup
25536 pts/0    00:00:00 ps
[root@ns1 ~]# 

[root@ns1 ~]# ps -el
F S   UID    PID   PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
4 S     0      1      0  0  80   0 -  4837 poll_s ?        00:00:01 init
1 S     0      2      0  0  80   0 -     0 kthrea ?        00:00:00 kthreadd
1 S     0      3      2  0 -40   - -     0 migrat ?        00:00:00 migration/0
1 S     0      4      2  0  80   0 -     0 ksofti ?        00:00:00 ksoftirqd/0
1 S     0      5      2  0 -40   - -     0 cpu_st ?        00:00:00 stopper/0
1 S     0      6      2  0 -40   - -     0 watchd ?        00:00:00 watchdog/0
1 S     0      7      2  0  80   0 -     0 worker ?        00:00:22 events/0
1 S     0      8      2  0  80   0 -     0 worker ?        00:00:00 events/0
1 S     0      9      2  0  80   0 -     0 worker ?        00:00:00 events_long/0
1 S     0     10      2  0  80   0 -     0 worker ?        00:00:00 events_power_ef
1 S     0     11      2  0  80   0 -     0 worker ?        00:00:00 cgroup
1 S     0     12      2  0  80   0 -     0 worker ?        00:00:00 khelper
1 S     0     13      2  0  80   0 -     0 worker ?        00:00:00 netns
1 S     0     14      2  0  80   0 -     0 async_ ?        00:00:00 async/mgr
1 S     0     15      2  0  80   0 -     0 worker ?        00:00:00 pm
1 S     0     16      2  0  80   0 -     0 bdi_sy ?        00:00:00 sync_supers
1 S     0     17      2  0  80   0 -     0 bdi_fo ?        00:00:00 bdi-default
1 S     0     18      2  0  80   0 -     0 worker ?        00:00:00 kintegrityd/0
1 S     0     19      2  0  80   0 -     0 worker ?        00:00:02 kblockd/0
1 S     0     20      2  0  80   0 -     0 worker ?        00:00:00 kacpid
1 S     0     21      2  0  80   0 -     0 worker ?        00:00:00 kacpi_notify
1 S     0     22      2  0  80   0 -     0 worker ?        00:00:00 kacpi_hotplug
1 S     0     23      2  0  80   0 -     0 worker ?        00:00:00 ata_aux
1 S     0     24      2  0  80   0 -     0 worker ?        00:00:00 ata_sff/0
1 S     0     25      2  0  80   0 -     0 worker ?        00:00:00 ksuspend_usbd
1 S     0     26      2  0  80   0 -     0 hub_th ?        00:00:00 khubd
5 S     0     27      2  0  80   0 -     0 serio_ ?        00:00:00 kseriod
1 S     0     28      2  0  80   0 -     0 worker ?        00:00:00 md/0
1 S     0     29      2  0  80   0 -     0 worker ?        00:00:00 md_misc/0
1 S     0     30      2  0  80   0 -     0 worker ?        00:00:00 linkwatch
1 S     0     32      2  0  80   0 -     0 watchd ?        00:00:00 khungtaskd
1 S     0     33      2  0  80   0 -     0 kswapd ?        00:00:00 kswapd0
1 S     0     34      2  0  85   5 -     0 ksm_sc ?        00:00:00 ksmd
1 S     0     35      2  0  99  19 -     0 khugep ?        00:00:00 khugepaged
1 S     0     36      2  0  80   0 -     0 worker ?        00:00:00 aio/0
1 S     0     37      2  0  80   0 -     0 worker ?        00:00:00 crypto/0
1 S     0     44      2  0  80   0 -     0 worker ?        00:00:00 kthrotld/0
1 S     0     45      2  0  80   0 -     0 worker ?        00:00:00 pciehpd
1 S     0     47      2  0  80   0 -     0 worker ?        00:00:00 kpsmoused
1 S     0     48      2  0  80   0 -     0 worker ?        00:00:00 usbhid_resumer
1 S     0     49      2  0  80   0 -     0 worker ?        00:00:00 deferwq
1 S     0     81      2  0  80   0 -     0 worker ?        00:00:00 kdmremove
1 S     0     82      2  0  80   0 -     0 worker ?        00:00:00 kstriped
1 S     0    113      2  0  80   0 -     0 worker ?        00:00:00 ttm_swap
1 S     0    245      2  0  80   0 -     0 scsi_e ?        00:00:00 scsi_eh_0
1 S     0    248      2  0  80   0 -     0 scsi_e ?        00:00:00 scsi_eh_1
1 S     0    259      2  0  80   0 -     0 worker ?        00:00:01 mpt_poll_0
1 S     0    260      2  0  80   0 -     0 worker ?        00:00:00 mpt/0
1 S     0    261      2  0  80   0 -     0 scsi_e ?        00:00:00 scsi_eh_2
1 S     0    417      2  0  80   0 -     0 kjourn ?        00:00:01 jbd2/sda3-8
1 S     0    418      2  0  80   0 -     0 worker ?        00:00:00 ext4-dio-unwrit
1 S     0    511      2  0  80   0 -     0 bdi_wr ?        00:00:00 flush-8:0
5 S     0    515      1  0  76  -4 -  2703 poll_s ?        00:00:00 udevd
1 S     0    652      2  0  80   0 -     0 worker ?        00:00:01 vmmemctl
5 S     0    812    515  0  78  -2 -  2663 poll_s ?        00:00:00 udevd
1 S     0    817      2  0  80   0 -     0 worker ?        00:00:00 kdmflush
1 S     0    850      2  0  80   0 -     0 kjourn ?        00:00:00 jbd2/sda1-8
1 S     0    851      2  0  80   0 -     0 worker ?        00:00:00 ext4-dio-unwrit
1 S     0    854      2  0  80   0 -     0 kjourn ?        00:00:00 kjournald
1 S     0    897      2  0  80   0 -     0 kaudit ?        00:00:00 kauditd
1 S     0    956      2  0  80   0 -     0 worker ?        00:00:00 ib_addr
1 S     0    961      2  0  80   0 -     0 worker ?        00:00:00 infiniband/0
1 S     0    970      2  0  80   0 -     0 worker ?        00:00:00 ib_mcast
1 S     0    975      2  0  80   0 -     0 worker ?        00:00:00 iw_cm_wq
1 S     0    980      2  0  80   0 -     0 worker ?        00:00:00 ib_cm/0
1 S     0    985      2  0  80   0 -     0 worker ?        00:00:00 rdma_cm
1 S     0   1006      2  0  80   0 -     0 worker ?        00:00:00 ipoib_flush
5 S     0   1224      1  0  76  -4 -  7443 ep_pol ?        00:00:00 auditd
5 S     0   1258      1  0  80   0 - 62272 poll_s ?        00:00:00 rsyslogd
5 S    32   1309      1  0  80   0 -  4746 poll_s ?        00:00:00 rpcbind
5 S    29   1331      1  0  80   0 -  5839 poll_s ?        00:00:00 rpc.statd
5 S    81   1366      1  0  80   0 -  5360 poll_s ?        00:00:00 dbus-daemon
4 S     0   1387      1  0  80   0 - 47271 ep_pol ?        00:00:00 cupsd
1 S     0   1419      1  0  80   0 -  1021 poll_s ?        00:00:00 acpid
5 S    68   1431      1  0  80   0 -  9563 poll_s ?        00:00:00 hald
0 S     0   1432   1431  0  80   0 -  5100 poll_s ?        00:00:00 hald-runner
0 S     0   1464   1432  0  80   0 -  5630 poll_s ?        00:00:00 hald-addon-inpu
4 S    68   1482   1432  0  80   0 -  4502 unix_s ?        00:00:00 hald-addon-acpi
5 S     0   1506      1  0  80   0 - 96540 sys_rt ?        00:00:01 automount
1 S     0   1554      1  0  80   0 -  1567 poll_s ?        00:00:00 mcelog
5 S     0   1571      1  0  80   0 - 16565 poll_s ?        00:00:00 sshd
4 S     0   1650      1  0  80   0 - 20240 ep_pol ?        00:00:00 master
4 S    89   1657   1650  0  80   0 - 20302 ep_pol ?        00:00:00 qmgr
1 S     0   1664      1  0  80   0 - 45728 poll_s ?        00:00:00 abrtd
1 S     0   1691      1  0  80   0 - 29222 hrtime ?        00:00:00 crond
5 S     0   1706      1  0  80   0 -  5278 hrtime ?        00:00:00 atd
1 S     0   1722      1  0  80   0 - 16106 ep_pol ?        00:00:00 certmonger
4 S     0   1761      1  0  80   0 -  1017 n_tty_ tty1     00:00:00 mingetty
4 S     0   1764      1  0  80   0 -  1017 n_tty_ tty2     00:00:00 mingetty
4 S     0   1769      1  0  80   0 -  1017 n_tty_ tty3     00:00:00 mingetty
4 S     0   1773      1  0  80   0 -  1017 n_tty_ tty4     00:00:00 mingetty
4 S     0   1775      1  0  80   0 -  1017 n_tty_ tty5     00:00:00 mingetty
4 S     0   1778      1  0  80   0 -  1017 n_tty_ tty6     00:00:00 mingetty
4 S     0   1837   1571  0  80   0 - 26158 poll_s ?        00:00:00 sshd
4 S     0   1839   1837  0  80   0 - 27081 do_wai pts/0    00:00:00 bash
4 S    89  25276   1650  0  80   0 - 20260 ep_pol ?        00:00:00 pickup
4 R     0  25538   1839  2  80   0 - 27037 -      pts/0    00:00:00 ps
[root@ns1 ~]# 

[root@ns1 ~]# ps -elF
F S UID         PID   PPID  C PRI  NI ADDR SZ WCHAN    RSS PSR STIME TTY          TIME CMD
4 S root          1      0  0  80   0 -  4837 poll_s  1556   0 Apr23 ?        00:00:01 /sb
1 S root          2      0  0  80   0 -     0 kthrea     0   0 Apr23 ?        00:00:00 0
1 S root          3      2  0 -40   - -     0 migrat     0   0 Apr23 ?        00:00:00 0
1 S root          4      2  0  80   0 -     0 ksofti     0   0 Apr23 ?        00:00:00 0
1 S root          5      2  0 -40   - -     0 cpu_st     0   0 Apr23 ?        00:00:00 0
1 S root          6      2  0 -40   - -     0 watchd     0   0 Apr23 ?        00:00:00 0
1 S root          7      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:22 0
1 S root          8      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root          9      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         10      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         11      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         12      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         13      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         14      2  0  80   0 -     0 async_     0   0 Apr23 ?        00:00:00 0
1 S root         15      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         16      2  0  80   0 -     0 bdi_sy     0   0 Apr23 ?        00:00:00 0
1 S root         17      2  0  80   0 -     0 bdi_fo     0   0 Apr23 ?        00:00:00 0
1 S root         18      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         19      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:02 0
1 S root         20      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         21      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         22      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         23      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         24      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         25      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         26      2  0  80   0 -     0 hub_th     0   0 Apr23 ?        00:00:00 0
5 S root         27      2  0  80   0 -     0 serio_     0   0 Apr23 ?        00:00:00 0
1 S root         28      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         29      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         30      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         32      2  0  80   0 -     0 watchd     0   0 Apr23 ?        00:00:00 0
1 S root         33      2  0  80   0 -     0 kswapd     0   0 Apr23 ?        00:00:00 0
1 S root         34      2  0  85   5 -     0 ksm_sc     0   0 Apr23 ?        00:00:00 0
1 S root         35      2  0  99  19 -     0 khugep     0   0 Apr23 ?        00:00:00 0
1 S root         36      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         37      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         44      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         45      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         47      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         48      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         49      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         81      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root         82      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root        113      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root        245      2  0  80   0 -     0 scsi_e     0   0 Apr23 ?        00:00:00 0
1 S root        248      2  0  80   0 -     0 scsi_e     0   0 Apr23 ?        00:00:00 0
1 S root        259      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:01 0
1 S root        260      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root        261      2  0  80   0 -     0 scsi_e     0   0 Apr23 ?        00:00:00 0
1 S root        417      2  0  80   0 -     0 kjourn     0   0 Apr23 ?        00:00:01 0
1 S root        418      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root        511      2  0  80   0 -     0 bdi_wr     0   0 Apr23 ?        00:00:00 0
5 S root        515      1  0  76  -4 -  2703 poll_s   920   0 Apr23 ?        00:00:00 /sb
1 S root        652      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:01 0
5 S root        812    515  0  78  -2 -  2663 poll_s   800   0 Apr23 ?        00:00:00 /sb
1 S root        817      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root        850      2  0  80   0 -     0 kjourn     0   0 Apr23 ?        00:00:00 0
1 S root        851      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root        854      2  0  80   0 -     0 kjourn     0   0 Apr23 ?        00:00:00 0
1 S root        897      2  0  80   0 -     0 kaudit     0   0 Apr23 ?        00:00:00 0
1 S root        956      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root        961      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root        970      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root        975      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root        980      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root        985      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
1 S root       1006      2  0  80   0 -     0 worker     0   0 Apr23 ?        00:00:00 0
5 S root       1224      1  0  76  -4 -  7443 ep_pol   868   0 Apr23 ?        00:00:00 aud
5 S root       1258      1  0  80   0 - 62272 poll_s  1652   0 Apr23 ?        00:00:00 /sb
5 S rpc        1309      1  0  80   0 -  4746 poll_s   880   0 Apr23 ?        00:00:00 rpc
5 S rpcuser    1331      1  0  80   0 -  5839 poll_s  1376   0 Apr23 ?        00:00:00 rpc
5 S dbus       1366      1  0  80   0 -  5360 poll_s   928   0 Apr23 ?        00:00:00 dbu
4 S root       1387      1  0  80   0 - 47271 ep_pol  3368   0 Apr23 ?        00:00:00 cup
1 S root       1419      1  0  80   0 -  1021 poll_s   660   0 Apr23 ?        00:00:00 /us
5 S 68         1431      1  0  80   0 -  9563 poll_s  4140   0 Apr23 ?        00:00:00 hal
0 S root       1432   1431  0  80   0 -  5100 poll_s  1372   0 Apr23 ?        00:00:00 hal
0 S root       1464   1432  0  80   0 -  5630 poll_s  1292   0 Apr23 ?        00:00:00 hal
4 S 68         1482   1432  0  80   0 -  4502 unix_s  1148   0 Apr23 ?        00:00:00 hal
5 S root       1506      1  0  80   0 - 96540 sys_rt  1928   0 Apr23 ?        00:00:01 aut
1 S root       1554      1  0  80   0 -  1567 poll_s   380   0 Apr23 ?        00:00:00 /us
5 S root       1571      1  0  80   0 - 16565 poll_s  1248   0 Apr23 ?        00:00:00 /us
4 S root       1650      1  0  80   0 - 20240 ep_pol  3452   0 Apr23 ?        00:00:00 /us
4 S postfix    1657   1650  0  80   0 - 20302 ep_pol  3460   0 Apr23 ?        00:00:00 qmg
1 S root       1664      1  0  80   0 - 45728 poll_s  2388   0 Apr23 ?        00:00:00 /us
1 S root       1691      1  0  80   0 - 29222 hrtime  1272   0 Apr23 ?        00:00:00 cro
5 S root       1706      1  0  80   0 -  5278 hrtime   500   0 Apr23 ?        00:00:00 /us
1 S root       1722      1  0  80   0 - 16106 ep_pol  1424   0 Apr23 ?        00:00:00 /us
4 S root       1761      1  0  80   0 -  1017 n_tty_   584   0 Apr23 tty1     00:00:00 /sb
4 S root       1764      1  0  80   0 -  1017 n_tty_   580   0 Apr23 tty2     00:00:00 /sb
4 S root       1769      1  0  80   0 -  1017 n_tty_   580   0 Apr23 tty3     00:00:00 /sb
4 S root       1773      1  0  80   0 -  1017 n_tty_   580   0 Apr23 tty4     00:00:00 /sb
4 S root       1775      1  0  80   0 -  1017 n_tty_   580   0 Apr23 tty5     00:00:00 /sb
4 S root       1778      1  0  80   0 -  1017 n_tty_   580   0 Apr23 tty6     00:00:00 /sb
4 S root       1837   1571  0  80   0 - 26158 poll_s  4588   0 Apr23 ?        00:00:00 ssh
4 S root       1839   1837  0  80   0 - 27081 do_wai  1904   0 Apr23 pts/0    00:00:00 -ba
4 S postfix   25276   1650  0  80   0 - 20260 ep_pol  3408   0 Apr23 ?        00:00:00 pic
4 R root      25540   1839  1  80   0 - 27563 -       1144   0 00:27 pts/0    00:00:00 ps
[root@ns1 ~]# 
备注:PPID:父进程的进程ID(Parent Process id)
 NI:优先级(Nice)
 PRI:进程优先级编号(Priority)
 WCHAN:进程正在睡眠的内核函数名称:该函数的名称是从/root/system.map文件中获得的。
 FLAGS:与进程相关的数字标识。
 PSR:正在运行在哪个CPU上
free
解释:可以显示当前系统未使用的和已使用的内存数目,还可以显示被内核使用的内存缓冲区。
选项:-b:以Byte为单位显示内存使用情况:
 -k:以KB为单位显示内存使用情况:
 -m:以MB为单位显示内存使用情况:
 -o:不显示缓冲区调节列:
 -s<间隔秒数>:持续观察内存使用状况;
 -t:显示内存总和列;
 -V:显示版本信息。
举例:
[root@ns1 ~]# free -m
total       used       free     shared    buffers     cached
Mem:           980        476        503          0         48        302
-/+ buffers/cache:        125        854
Swap:         2047          0       2047
[root@ns1 ~]# 
备注:total:物理内存2871MB;
 swap:交换内存6143MB
 第一部分Men行解释:
total:内存总数;used:已经使用的内存数;free:空闲的内存数;
shared:当前已经废弃不用;buffers
Buffer:缓存内存数;cached Page:缓存内存数;关系:total = used + free
 第二部分(-/+buffers/cache)解释:
(-buffers/cache)used内存数:第一部分Men行中的used - buffers - cached
(+buffers/cache)
free内存数:第一部分Men行中的free + buffers +cached
可见-buffers/cache反映的是被程序实实在在吃掉的内存,而+buffers/cache反映的是可以挪用的内存总数。
 第三部分是指交换分区。
pidof(了解即可)
解释:用来查找正在运行进程的进程号(pid)的工具
举例:
[root@ns1 ~]# pidof sshd
1837 1571
[root@ns1 ~]# 
top(重要,结合windows任务管理器讲解)
解释:命令行下动态下显示每个进程,每五秒刷新一次
选项:-d:指定延迟时长,默认单位为秒
 [root@ns1 ~]# top -d 1
top - 01:00:15 up  8:42,  1 user,  load average: 0.00, 0.00, 0.00
Tasks:  97 total,   1 running,  96 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  1.0%sy,  0.0%ni, 99.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1004112k total,   488628k used,   515484k free,    50148k buffers
Swap:  2097148k total,        0k used,  2097148k free,   309576k cached


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                    
 1837 root      20   0  102m 4600 3552 S  1.0  0.5   0:00.44 sshd                        
25612 root      20   0 15036 1204  932 R  1.0  0.1   0:00.03 top                         
1 root      20   0 19348 1556 1232 S  0.0  0.2   0:01.68 init                        
2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd                    
3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0                 
4 root      20   0     0    0    0 S  0.0  0.0   0:00.13 ksoftirqd/0                 
5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/0                   
6 root      RT   0     0    0    0 S  0.0  0.0   0:00.21 watchdog/0                  
7 root      20   0     0    0    0 S  0.0  0.0   0:23.98 events/0                    
8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events/0                    
9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events_long/0               
10 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events_power_ef             
11 root      20   0     0    0    0 S  0.0  0.0   0:00.00 cgroup                      
12 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper                     
13 root      20   0     0    0    0 S  0.0  0.0   0:00.00 netns                       
14 root      20   0     0    0    0 S  0.0  0.0   0:00.00 async/mgr                   
15 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pm                          
16 root      20   0     0    0    0 S  0.0  0.0   0:00.43 sync_supers                 
17 root      20   0     0    0    0 S  0.0  0.0   0:00.01 bdi-default                 
18 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kintegrityd/0               
19 root      20   0     0    0    0 S  0.0  0.0   0:02.85 kblockd/0                   
20 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpid                      
21 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify                
22 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpi_hotplug               
23 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ata_aux                     
24 root      20   0     0    0    0 S  0.0  0.0   0:00.01 ata_sff/0                   
25 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksuspend_usbd               
26 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khubd                       
27 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kseriod                     
28 root      20   0     0    0    0 S  0.0  0.0   0:00.00 md/0                        
29 root      20   0     0    0    0 S  0.0  0.0   0:00.00 md_misc/0                   
30 root      20   0     0    0    0 S  0.0  0.0   0:00.00 linkwatch                   
32 root      20   0     0    0    0 S  0.0  0.0   0:00.05 khungtaskd                  
33 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kswapd0                     
34 root      25   5     0    0    0 S  0.0  0.0   0:00.00 ksmd                        
35 root      39  19     0    0    0 S  0.0  0.0   0:00.02 khugepaged                  
[root@ns1 ~]# 
 -b:刷屏显示(默认一屏显示不完)
[root@ns1 ~]# top -d 1 -b
top - 01:01:47 up  8:44,  1 user,  load average: 0.00, 0.00, 0.00
Tasks:  97 total,   1 running,  96 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.4%sy,  0.1%ni, 99.3%id,  0.2%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1004112k total,   488628k used,   515484k free,    50184k buffers
Swap:  2097148k total,        0k used,  2097148k free,   309584k cached


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                     
1 root      20   0 19348 1556 1232 S  0.0  0.2   0:01.68 init                        
2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd                    
3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0                 
4 root      20   0     0    0    0 S  0.0  0.0   0:00.13 ksoftirqd/0                 
5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/0                   
6 root      RT   0     0    0    0 S  0.0  0.0   0:00.21 watchdog/0                  
7 root      20   0     0    0    0 S  0.0  0.0   0:24.05 events/0                    
8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events/0                    
9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events_long/0               
10 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events_power_ef             
11 root      20   0     0    0    0 S  0.0  0.0   0:00.00 cgroup                      
12 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper                     
13 root      20   0     0    0    0 S  0.0  0.0   0:00.00 netns                       
14 root      20   0     0    0    0 S  0.0  0.0   0:00.00 async/mgr                   
15 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pm                          
16 root      20   0     0    0    0 S  0.0  0.0   0:00.43 sync_supers                 
17 root      20   0     0    0    0 S  0.0  0.0   0:00.01 bdi-default                 
18 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kintegrityd/0               
19 root      20   0     0    0    0 S  0.0  0.0   0:02.85 kblockd/0                   
20 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpid                      
21 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify                
22 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpi_hotplug               
23 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ata_aux                     
24 root      20   0     0    0    0 S  0.0  0.0   0:00.01 ata_sff/0                   
25 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksuspend_usbd               
26 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khubd                       
27 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kseriod                     
28 root      20   0     0    0    0 S  0.0  0.0   0:00.00 md/0                        
29 root      20   0     0    0    0 S  0.0  0.0   0:00.00 md_misc/0                   
30 root      20   0     0    0    0 S  0.0  0.0   0:00.00 linkwatch                   
32 root      20   0     0    0    0 S  0.0  0.0   0:00.05 khungtaskd                  
33 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kswapd0                     
34 root      25   5     0    0    0 S  0.0  0.0   0:00.00 ksmd                        
35 root      39  19     0    0    0 S  0.0  0.0   0:00.02 khugepaged                  
36 root      20   0     0    0    0 S  0.0  0.0   0:00.00 aio/0                       
37 root      20   0     0    0    0 S  0.0  0.0   0:00.00 crypto/0                    
44 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthrotld/0                  
45 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pciehpd                     
47 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kpsmoused                   
48 root      20   0     0    0    0 S  0.0  0.0   0:00.00 usbhid_resumer              
49 root      20   0     0    0    0 S  0.0  0.0   0:00.00 deferwq                     
81 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kdmremove                   
82 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kstriped                    
  113 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ttm_swap                    
  245 root      20   0     0    0    0 S  0.0  0.0   0:00.01 scsi_eh_0                   
  248 root      20   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_1                   
  259 root      20   0     0    0    0 S  0.0  0.0   0:01.93 mpt_poll_0                  
  260 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mpt/0                       
  261 root      20   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_2                   
  417 root      20   0     0    0    0 S  0.0  0.0   0:01.10 jbd2/sda3-8                 
  418 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ext4-dio-unwrit             
  511 root      20   0     0    0    0 S  0.0  0.0   0:00.58 flush-8:0                   
  515 root      16  -4 10812  920  344 S  0.0  0.1   0:00.30 udevd                       
  652 root      20   0     0    0    0 S  0.0  0.0   0:02.03 vmmemctl                    
  812 root      18  -2 10652  800  368 S  0.0  0.1   0:00.01 udevd                       
  817 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kdmflush                    
  850 root      20   0     0    0    0 S  0.0  0.0   0:00.00 jbd2/sda1-8                 
  851 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ext4-dio-unwrit             
  854 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kjournald                   
  897 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kauditd                     
  956 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ib_addr                     
  961 root      20   0     0    0    0 S  0.0  0.0   0:00.00 infiniband/0                
  970 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ib_mcast                    
  975 root      20   0     0    0    0 S  0.0  0.0   0:00.00 iw_cm_wq                    
  980 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ib_cm/0                     
  985 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rdma_cm                     
 1006 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ipoib_flush                 
 1224 root      16  -4 29772  868  620 S  0.0  0.1   0:00.15 auditd                      
 1258 root      20   0  243m 1660 1096 S  0.0  0.2   0:00.10 rsyslogd                    
 1309 rpc       20   0 18984  880  632 S  0.0  0.1   0:00.20 rpcbind                     
 1331 rpcuser   20   0 23356 1376  920 S  0.0  0.1   0:00.00 rpc.statd                   
 1366 dbus      20   0 21440  928  636 S  0.0  0.1   0:00.00 dbus-daemon                 
 1387 root      20   0  184m 3368 2496 S  0.0  0.3   0:00.05 cupsd                       
 1419 root      20   0  4084  660  540 S  0.0  0.1   0:00.00 acpid                       
 1431 haldaemo  20   0 38252 4140 3144 S  0.0  0.4   0:00.80 hald                        
 1432 root      20   0 20400 1372 1132 S  0.0  0.1   0:00.02 hald-runner                 
 1464 root      20   0 22520 1292 1112 S  0.0  0.1   0:00.00 hald-addon-inpu             
 1482 haldaemo  20   0 18008 1148  984 S  0.0  0.1   0:00.00 hald-addon-acpi             
 1506 root      20   0  377m 1928 1412 S  0.0  0.2   0:01.23 automount                   
 1554 root      20   0  6300  380  244 S  0.0  0.0   0:00.00 mcelog                      
 1571 root      20   0 66260 1248  520 S  0.0  0.1   0:00.00 sshd                        
 1650 root      20   0 80960 3452 2552 S  0.0  0.3   0:00.38 master                      
 1657 postfix   20   0 81208 3460 2580 S  0.0  0.3   0:00.09 qmgr                        
 1664 root      20   0  178m 2388 1556 S  0.0  0.2   0:00.01 abrtd                       
 1691 root      20   0  114m 1272  660 S  0.0  0.1   0:00.33 crond                       
 1706 root      20   0 21112  500  308 S  0.0  0.0   0:00.00 atd                         
 1722 root      20   0 64424 1424  720 S  0.0  0.1   0:00.08 certmonger                  
 1761 root      20   0  4068  584  496 S  0.0  0.1   0:00.00 mingetty                    
 1764 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1769 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1773 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1775 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1778 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1837 root      20   0  102m 4600 3552 S  0.0  0.5   0:00.45 sshd                        
 1839 root      20   0  105m 1904 1536 S  0.0  0.2   0:00.09 bash                        
25562 postfix   20   0 81040 3404 2536 S  0.0  0.3   0:00.02 pickup                      
25651 root      20   0 15032 1088  828 R  0.0  0.1   0:00.00 top                         
-n #:显示几百屏后退出
[root@ns1 ~]# top -d 1 -b -n 3
top - 01:03:56 up  8:46,  1 user,  load average: 0.00, 0.00, 0.00
Tasks:  97 total,   1 running,  96 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.4%sy,  0.1%ni, 99.3%id,  0.2%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1004112k total,   488628k used,   515484k free,    50216k buffers
Swap:  2097148k total,        0k used,  2097148k free,   309588k cached


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                     
1 root      20   0 19348 1556 1232 S  0.0  0.2   0:01.68 init                        
2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd                    
3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0                 
4 root      20   0     0    0    0 S  0.0  0.0   0:00.13 ksoftirqd/0                 
5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/0                   
6 root      RT   0     0    0    0 S  0.0  0.0   0:00.21 watchdog/0                  
7 root      20   0     0    0    0 S  0.0  0.0   0:24.14 events/0                    
8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events/0                    
9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events_long/0               
10 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events_power_ef             
11 root      20   0     0    0    0 S  0.0  0.0   0:00.00 cgroup                      
12 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper                     
13 root      20   0     0    0    0 S  0.0  0.0   0:00.00 netns                       
14 root      20   0     0    0    0 S  0.0  0.0   0:00.00 async/mgr                   
15 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pm                          
16 root      20   0     0    0    0 S  0.0  0.0   0:00.44 sync_supers                 
17 root      20   0     0    0    0 S  0.0  0.0   0:00.01 bdi-default                 
18 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kintegrityd/0               
19 root      20   0     0    0    0 S  0.0  0.0   0:02.85 kblockd/0                   
20 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpid                      
21 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify                
22 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpi_hotplug               
23 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ata_aux                     
24 root      20   0     0    0    0 S  0.0  0.0   0:00.01 ata_sff/0                   
25 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksuspend_usbd               
26 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khubd                       
27 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kseriod                     
28 root      20   0     0    0    0 S  0.0  0.0   0:00.00 md/0                        
29 root      20   0     0    0    0 S  0.0  0.0   0:00.00 md_misc/0                   
30 root      20   0     0    0    0 S  0.0  0.0   0:00.00 linkwatch                   
32 root      20   0     0    0    0 S  0.0  0.0   0:00.05 khungtaskd                  
33 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kswapd0                     
34 root      25   5     0    0    0 S  0.0  0.0   0:00.00 ksmd                        
35 root      39  19     0    0    0 S  0.0  0.0   0:00.02 khugepaged                  
36 root      20   0     0    0    0 S  0.0  0.0   0:00.00 aio/0                       
37 root      20   0     0    0    0 S  0.0  0.0   0:00.00 crypto/0                    
44 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthrotld/0                  
45 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pciehpd                     
47 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kpsmoused                   
48 root      20   0     0    0    0 S  0.0  0.0   0:00.00 usbhid_resumer              
49 root      20   0     0    0    0 S  0.0  0.0   0:00.00 deferwq                     
81 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kdmremove                   
82 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kstriped                    
  113 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ttm_swap                    
  245 root      20   0     0    0    0 S  0.0  0.0   0:00.01 scsi_eh_0                   
  248 root      20   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_1                   
  259 root      20   0     0    0    0 S  0.0  0.0   0:01.94 mpt_poll_0                  
  260 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mpt/0                       
  261 root      20   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_2                   
  417 root      20   0     0    0    0 S  0.0  0.0   0:01.10 jbd2/sda3-8                 
  418 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ext4-dio-unwrit             
  511 root      20   0     0    0    0 S  0.0  0.0   0:00.58 flush-8:0                   
  515 root      16  -4 10812  920  344 S  0.0  0.1   0:00.30 udevd                       
  652 root      20   0     0    0    0 S  0.0  0.0   0:02.04 vmmemctl                    
  812 root      18  -2 10652  800  368 S  0.0  0.1   0:00.01 udevd                       
  817 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kdmflush                    
  850 root      20   0     0    0    0 S  0.0  0.0   0:00.00 jbd2/sda1-8                 
  851 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ext4-dio-unwrit             
  854 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kjournald                   
  897 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kauditd                     
  956 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ib_addr                     
  961 root      20   0     0    0    0 S  0.0  0.0   0:00.00 infiniband/0                
  970 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ib_mcast                    
  975 root      20   0     0    0    0 S  0.0  0.0   0:00.00 iw_cm_wq                    
  980 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ib_cm/0                     
  985 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rdma_cm                     
 1006 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ipoib_flush                 
 1224 root      16  -4 29772  868  620 S  0.0  0.1   0:00.15 auditd                      
 1258 root      20   0  243m 1660 1096 S  0.0  0.2   0:00.10 rsyslogd                    
 1309 rpc       20   0 18984  880  632 S  0.0  0.1   0:00.20 rpcbind                     
 1331 rpcuser   20   0 23356 1376  920 S  0.0  0.1   0:00.00 rpc.statd                   
 1366 dbus      20   0 21440  928  636 S  0.0  0.1   0:00.00 dbus-daemon                 
 1387 root      20   0  184m 3368 2496 S  0.0  0.3   0:00.05 cupsd                       
 1419 root      20   0  4084  660  540 S  0.0  0.1   0:00.00 acpid                       
 1431 haldaemo  20   0 38252 4140 3144 S  0.0  0.4   0:00.80 hald                        
 1432 root      20   0 20400 1372 1132 S  0.0  0.1   0:00.02 hald-runner                 
 1464 root      20   0 22520 1292 1112 S  0.0  0.1   0:00.00 hald-addon-inpu             
 1482 haldaemo  20   0 18008 1148  984 S  0.0  0.1   0:00.00 hald-addon-acpi             
 1506 root      20   0  377m 1928 1412 S  0.0  0.2   0:01.23 automount                   
 1554 root      20   0  6300  380  244 S  0.0  0.0   0:00.00 mcelog                      
 1571 root      20   0 66260 1248  520 S  0.0  0.1   0:00.00 sshd                        
 1650 root      20   0 80960 3452 2552 S  0.0  0.3   0:00.38 master                      
 1657 postfix   20   0 81208 3460 2580 S  0.0  0.3   0:00.09 qmgr                        
 1664 root      20   0  178m 2388 1556 S  0.0  0.2   0:00.01 abrtd                       
 1691 root      20   0  114m 1272  660 S  0.0  0.1   0:00.33 crond                       
 1706 root      20   0 21112  500  308 S  0.0  0.0   0:00.00 atd                         
 1722 root      20   0 64424 1424  720 S  0.0  0.1   0:00.08 certmonger                  
 1761 root      20   0  4068  584  496 S  0.0  0.1   0:00.00 mingetty                    
 1764 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1769 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1773 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1775 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1778 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1837 root      20   0  102m 4600 3552 S  0.0  0.5   0:00.48 sshd                        
 1839 root      20   0  105m 1904 1536 S  0.0  0.2   0:00.10 bash                        
25562 postfix   20   0 81040 3404 2536 S  0.0  0.3   0:00.03 pickup                      
25655 root      20   0 15032 1084  828 R  0.0  0.1   0:00.02 top                         




top - 01:03:57 up  8:46,  1 user,  load average: 0.00, 0.00, 0.00
Tasks:  97 total,   1 running,  96 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.0%us,  1.0%sy,  0.0%ni, 98.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1004112k total,   488628k used,   515484k free,    50216k buffers
Swap:  2097148k total,        0k used,  2097148k free,   309588k cached


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                     
25655 root      20   0 15040 1188  924 R  1.0  0.1   0:00.03 top                         
1 root      20   0 19348 1556 1232 S  0.0  0.2   0:01.68 init                        
2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd                    
3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0                 
4 root      20   0     0    0    0 S  0.0  0.0   0:00.13 ksoftirqd/0                 
5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/0                   
6 root      RT   0     0    0    0 S  0.0  0.0   0:00.21 watchdog/0                  
7 root      20   0     0    0    0 S  0.0  0.0   0:24.14 events/0                    
8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events/0                    
9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events_long/0               
10 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events_power_ef             
11 root      20   0     0    0    0 S  0.0  0.0   0:00.00 cgroup                      
12 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper                     
13 root      20   0     0    0    0 S  0.0  0.0   0:00.00 netns                       
14 root      20   0     0    0    0 S  0.0  0.0   0:00.00 async/mgr                   
15 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pm                          
16 root      20   0     0    0    0 S  0.0  0.0   0:00.44 sync_supers                 
17 root      20   0     0    0    0 S  0.0  0.0   0:00.01 bdi-default                 
18 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kintegrityd/0               
19 root      20   0     0    0    0 S  0.0  0.0   0:02.85 kblockd/0                   
20 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpid                      
21 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify                
22 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpi_hotplug               
23 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ata_aux                     
24 root      20   0     0    0    0 S  0.0  0.0   0:00.01 ata_sff/0                   
25 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksuspend_usbd               
26 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khubd                       
27 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kseriod                     
28 root      20   0     0    0    0 S  0.0  0.0   0:00.00 md/0                        
29 root      20   0     0    0    0 S  0.0  0.0   0:00.00 md_misc/0                   
30 root      20   0     0    0    0 S  0.0  0.0   0:00.00 linkwatch                   
32 root      20   0     0    0    0 S  0.0  0.0   0:00.05 khungtaskd                  
33 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kswapd0                     
34 root      25   5     0    0    0 S  0.0  0.0   0:00.00 ksmd                        
35 root      39  19     0    0    0 S  0.0  0.0   0:00.02 khugepaged                  
36 root      20   0     0    0    0 S  0.0  0.0   0:00.00 aio/0                       
37 root      20   0     0    0    0 S  0.0  0.0   0:00.00 crypto/0                    
44 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthrotld/0                  
45 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pciehpd                     
47 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kpsmoused                   
48 root      20   0     0    0    0 S  0.0  0.0   0:00.00 usbhid_resumer              
49 root      20   0     0    0    0 S  0.0  0.0   0:00.00 deferwq                     
81 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kdmremove                   
82 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kstriped                    
  113 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ttm_swap                    
  245 root      20   0     0    0    0 S  0.0  0.0   0:00.01 scsi_eh_0                   
  248 root      20   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_1                   
  259 root      20   0     0    0    0 S  0.0  0.0   0:01.94 mpt_poll_0                  
  260 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mpt/0                       
  261 root      20   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_2                   
  417 root      20   0     0    0    0 S  0.0  0.0   0:01.10 jbd2/sda3-8                 
  418 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ext4-dio-unwrit             
  511 root      20   0     0    0    0 S  0.0  0.0   0:00.58 flush-8:0                   
  515 root      16  -4 10812  920  344 S  0.0  0.1   0:00.30 udevd                       
  652 root      20   0     0    0    0 S  0.0  0.0   0:02.04 vmmemctl                    
  812 root      18  -2 10652  800  368 S  0.0  0.1   0:00.01 udevd                       
  817 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kdmflush                    
  850 root      20   0     0    0    0 S  0.0  0.0   0:00.00 jbd2/sda1-8                 
  851 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ext4-dio-unwrit             
  854 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kjournald                   
  897 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kauditd                     
  956 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ib_addr                     
  961 root      20   0     0    0    0 S  0.0  0.0   0:00.00 infiniband/0                
  970 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ib_mcast                    
  975 root      20   0     0    0    0 S  0.0  0.0   0:00.00 iw_cm_wq                    
  980 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ib_cm/0                     
  985 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rdma_cm                     
 1006 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ipoib_flush                 
 1224 root      16  -4 29772  868  620 S  0.0  0.1   0:00.15 auditd                      
 1258 root      20   0  243m 1660 1096 S  0.0  0.2   0:00.10 rsyslogd                    
 1309 rpc       20   0 18984  880  632 S  0.0  0.1   0:00.20 rpcbind                     
 1331 rpcuser   20   0 23356 1376  920 S  0.0  0.1   0:00.00 rpc.statd                   
 1366 dbus      20   0 21440  928  636 S  0.0  0.1   0:00.00 dbus-daemon                 
 1387 root      20   0  184m 3368 2496 S  0.0  0.3   0:00.05 cupsd                       
 1419 root      20   0  4084  660  540 S  0.0  0.1   0:00.00 acpid                       
 1431 haldaemo  20   0 38252 4140 3144 S  0.0  0.4   0:00.80 hald                        
 1432 root      20   0 20400 1372 1132 S  0.0  0.1   0:00.02 hald-runner                 
 1464 root      20   0 22520 1292 1112 S  0.0  0.1   0:00.00 hald-addon-inpu             
 1482 haldaemo  20   0 18008 1148  984 S  0.0  0.1   0:00.00 hald-addon-acpi             
 1506 root      20   0  377m 1928 1412 S  0.0  0.2   0:01.23 automount                   
 1554 root      20   0  6300  380  244 S  0.0  0.0   0:00.00 mcelog                      
 1571 root      20   0 66260 1248  520 S  0.0  0.1   0:00.00 sshd                        
 1650 root      20   0 80960 3452 2552 S  0.0  0.3   0:00.38 master                      
 1657 postfix   20   0 81208 3460 2580 S  0.0  0.3   0:00.09 qmgr                        
 1664 root      20   0  178m 2388 1556 S  0.0  0.2   0:00.01 abrtd                       
 1691 root      20   0  114m 1272  660 S  0.0  0.1   0:00.33 crond                       
 1706 root      20   0 21112  500  308 S  0.0  0.0   0:00.00 atd                         
 1722 root      20   0 64424 1424  720 S  0.0  0.1   0:00.08 certmonger                  
 1761 root      20   0  4068  584  496 S  0.0  0.1   0:00.00 mingetty                    
 1764 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1769 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1773 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1775 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1778 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1837 root      20   0  102m 4600 3552 S  0.0  0.5   0:00.48 sshd                        
 1839 root      20   0  105m 1904 1536 S  0.0  0.2   0:00.10 bash                        
25562 postfix   20   0 81040 3404 2536 S  0.0  0.3   0:00.03 pickup                      




top - 01:03:58 up  8:46,  1 user,  load average: 0.00, 0.00, 0.00
Tasks:  97 total,   1 running,  96 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1004112k total,   488628k used,   515484k free,    50216k buffers
Swap:  2097148k total,        0k used,  2097148k free,   309588k cached


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                     
 1837 root      20   0  102m 4600 3552 S  1.0  0.5   0:00.49 sshd                        
1 root      20   0 19348 1556 1232 S  0.0  0.2   0:01.68 init                        
2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd                    
3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0                 
4 root      20   0     0    0    0 S  0.0  0.0   0:00.13 ksoftirqd/0                 
5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/0                   
6 root      RT   0     0    0    0 S  0.0  0.0   0:00.21 watchdog/0                  
7 root      20   0     0    0    0 S  0.0  0.0   0:24.14 events/0                    
8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events/0                    
9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events_long/0               
10 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events_power_ef             
11 root      20   0     0    0    0 S  0.0  0.0   0:00.00 cgroup                      
12 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper                     
13 root      20   0     0    0    0 S  0.0  0.0   0:00.00 netns                       
14 root      20   0     0    0    0 S  0.0  0.0   0:00.00 async/mgr                   
15 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pm                          
16 root      20   0     0    0    0 S  0.0  0.0   0:00.44 sync_supers                 
17 root      20   0     0    0    0 S  0.0  0.0   0:00.01 bdi-default                 
18 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kintegrityd/0               
19 root      20   0     0    0    0 S  0.0  0.0   0:02.85 kblockd/0                   
20 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpid                      
21 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify                
22 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpi_hotplug               
23 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ata_aux                     
24 root      20   0     0    0    0 S  0.0  0.0   0:00.01 ata_sff/0                   
25 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksuspend_usbd               
26 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khubd                       
27 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kseriod                     
28 root      20   0     0    0    0 S  0.0  0.0   0:00.00 md/0                        
29 root      20   0     0    0    0 S  0.0  0.0   0:00.00 md_misc/0                   
30 root      20   0     0    0    0 S  0.0  0.0   0:00.00 linkwatch                   
32 root      20   0     0    0    0 S  0.0  0.0   0:00.05 khungtaskd                  
33 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kswapd0                     
34 root      25   5     0    0    0 S  0.0  0.0   0:00.00 ksmd                        
35 root      39  19     0    0    0 S  0.0  0.0   0:00.02 khugepaged                  
36 root      20   0     0    0    0 S  0.0  0.0   0:00.00 aio/0                       
37 root      20   0     0    0    0 S  0.0  0.0   0:00.00 crypto/0                    
44 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthrotld/0                  
45 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pciehpd                     
47 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kpsmoused                   
48 root      20   0     0    0    0 S  0.0  0.0   0:00.00 usbhid_resumer              
49 root      20   0     0    0    0 S  0.0  0.0   0:00.00 deferwq                     
81 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kdmremove                   
82 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kstriped                    
  113 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ttm_swap                    
  245 root      20   0     0    0    0 S  0.0  0.0   0:00.01 scsi_eh_0                   
  248 root      20   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_1                   
  259 root      20   0     0    0    0 S  0.0  0.0   0:01.94 mpt_poll_0                  
  260 root      20   0     0    0    0 S  0.0  0.0   0:00.00 mpt/0                       
  261 root      20   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_2                   
  417 root      20   0     0    0    0 S  0.0  0.0   0:01.10 jbd2/sda3-8                 
  418 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ext4-dio-unwrit             
  511 root      20   0     0    0    0 S  0.0  0.0   0:00.58 flush-8:0                   
  515 root      16  -4 10812  920  344 S  0.0  0.1   0:00.30 udevd                       
  652 root      20   0     0    0    0 S  0.0  0.0   0:02.04 vmmemctl                    
  812 root      18  -2 10652  800  368 S  0.0  0.1   0:00.01 udevd                       
  817 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kdmflush                    
  850 root      20   0     0    0    0 S  0.0  0.0   0:00.00 jbd2/sda1-8                 
  851 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ext4-dio-unwrit             
  854 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kjournald                   
  897 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kauditd                     
  956 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ib_addr                     
  961 root      20   0     0    0    0 S  0.0  0.0   0:00.00 infiniband/0                
  970 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ib_mcast                    
  975 root      20   0     0    0    0 S  0.0  0.0   0:00.00 iw_cm_wq                    
  980 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ib_cm/0                     
  985 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rdma_cm                     
 1006 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ipoib_flush                 
 1224 root      16  -4 29772  868  620 S  0.0  0.1   0:00.15 auditd                      
 1258 root      20   0  243m 1660 1096 S  0.0  0.2   0:00.10 rsyslogd                    
 1309 rpc       20   0 18984  880  632 S  0.0  0.1   0:00.20 rpcbind                     
 1331 rpcuser   20   0 23356 1376  920 S  0.0  0.1   0:00.00 rpc.statd                   
 1366 dbus      20   0 21440  928  636 S  0.0  0.1   0:00.00 dbus-daemon                 
 1387 root      20   0  184m 3368 2496 S  0.0  0.3   0:00.05 cupsd                       
 1419 root      20   0  4084  660  540 S  0.0  0.1   0:00.00 acpid                       
 1431 haldaemo  20   0 38252 4140 3144 S  0.0  0.4   0:00.80 hald                        
 1432 root      20   0 20400 1372 1132 S  0.0  0.1   0:00.02 hald-runner                 
 1464 root      20   0 22520 1292 1112 S  0.0  0.1   0:00.00 hald-addon-inpu             
 1482 haldaemo  20   0 18008 1148  984 S  0.0  0.1   0:00.00 hald-addon-acpi             
 1506 root      20   0  377m 1928 1412 S  0.0  0.2   0:01.23 automount                   
 1554 root      20   0  6300  380  244 S  0.0  0.0   0:00.00 mcelog                      
 1571 root      20   0 66260 1248  520 S  0.0  0.1   0:00.00 sshd                        
 1650 root      20   0 80960 3452 2552 S  0.0  0.3   0:00.38 master                      
 1657 postfix   20   0 81208 3460 2580 S  0.0  0.3   0:00.09 qmgr                        
 1664 root      20   0  178m 2388 1556 S  0.0  0.2   0:00.01 abrtd                       
 1691 root      20   0  114m 1272  660 S  0.0  0.1   0:00.33 crond                       
 1706 root      20   0 21112  500  308 S  0.0  0.0   0:00.00 atd                         
 1722 root      20   0 64424 1424  720 S  0.0  0.1   0:00.08 certmonger                  
 1761 root      20   0  4068  584  496 S  0.0  0.1   0:00.00 mingetty                    
 1764 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1769 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1773 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1775 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1778 root      20   0  4068  580  496 S  0.0  0.1   0:00.00 mingetty                    
 1839 root      20   0  105m 1904 1536 S  0.0  0.2   0:00.10 bash                        
25562 postfix   20   0 81040 3404 2536 S  0.0  0.3   0:00.03 pickup                      
25655 root      20   0 15040 1188  924 R  0.0  0.1   0:00.03 top                         


[root@ns1 ~]# 
举例:
[root@ns1 ~]# top
top - 01:05:31(系统时间) up  8:48(运行时长),  1 user,  load average(平均队列长度): 0.00(过去一分钟), 0.00(过去五分钟), 0.00(过去十五分钟)
Tasks:  97 total(当前进程数),   1 running(当前正在运行的,一般只有一个,除非是双核),  96 sleeping,   0 stopped(停止的),   0 zombie(僵死的)
Cpu(s)(按数字1可以查看每个CPU的运行情况,比如,CPU0,CPU1):  0.3%us(用户空间,用户进程所占百分比),  0.3%sy(内核所占百分比),  0.0%ni(Nice值), 99.3%id(idle值,空闲百分比,越大越好),  0.0%wa(等待IO完成所占据的时间),  0.0%hi(硬件终端所占据的时间),  0.0%si(软件中断所占据时间),  0.0%st(被偷走的时间,主要在虚拟化场景出现)
Mem:   1004112k total,   488628k used,   515484k free,    50224k buffers
Swap:  2097148k total,        0k used,  2097148k free,   309588k cached


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                    
 1837 root      20   0  102m 4600 3552 S  0.3  0.5   0:00.50 sshd                        
25659 root      20   0 15036 1200  928 R  0.3  0.1   0:00.01 top                         
1 root      20   0 19348 1556 1232 S  0.0  0.2   0:01.68 init                        
2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd                    
3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0                 
4 root      20   0     0    0    0 S  0.0  0.0   0:00.13 ksoftirqd/0                 
5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/0                   
6 root      RT   0     0    0    0 S  0.0  0.0   0:00.21 watchdog/0                  
7 root      20   0     0    0    0 S  0.0  0.0   0:24.20 events/0                    
8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events/0                    
9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events_long/0               
10 root      20   0     0    0    0 S  0.0  0.0   0:00.00 events_power_ef             
11 root      20   0     0    0    0 S  0.0  0.0   0:00.00 cgroup                      
12 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper                     
13 root      20   0     0    0    0 S  0.0  0.0   0:00.00 netns                       
14 root      20   0     0    0    0 S  0.0  0.0   0:00.00 async/mgr                   
15 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pm                          
16 root      20   0     0    0    0 S  0.0  0.0   0:00.44 sync_supers                 
17 root      20   0     0    0    0 S  0.0  0.0   0:00.01 bdi-default                 
18 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kintegrityd/0               
19 root      20   0     0    0    0 S  0.0  0.0   0:02.85 kblockd/0                   
20 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpid                      
21 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify                
22 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kacpi_hotplug               
23 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ata_aux                     
24 root      20   0     0    0    0 S  0.0  0.0   0:00.01 ata_sff/0                   
25 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksuspend_usbd               
26 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khubd                       
27 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kseriod                     
28 root      20   0     0    0    0 S  0.0  0.0   0:00.00 md/0                        
29 root      20   0     0    0    0 S  0.0  0.0   0:00.00 md_misc/0                   
30 root      20   0     0    0    0 S  0.0  0.0   0:00.00 linkwatch                   
32 root      20   0     0    0    0 S  0.0  0.0   0:00.05 khungtaskd                  
33 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kswapd0                     
34 root      25   5     0    0    0 S  0.0  0.0   0:00.00 ksmd                        
35 root      39  19     0    0    0 S  0.0  0.0   0:00.02 khugepaged                  
[root@ns1 ~]# 
备注:VIRT(虚拟内存集) RES(常驻内存集) SHR(共享内存大小) S(状态) TIME+(占据CPU时长)
 此命令中可以进行交互,可以按下以下按键进行排序:
 M:根据驻留内存大小进行排序
 P:根据CPU适用百分比进行排序
 T:根据累计时间进行排序
 
 l:是否显示平均负载和启动时间
 t:是否显示进行和CPU状态相关信息
 m:是否显示内存相关信息
 
 c:是否显示完整的命令行信息
 q:退出top
 k:终止某个进程
按下k后会出现PID top kill:,此时将要杀死的进程号写在这里回车就行。













评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值