提醒:本文只是一个提示,TOP参数组合起来非常强大,单纯看中断的话,可以用systat或vmstat查看。mso-hansi-font-family:"Times New Roman"">
mso-hansi-font-family:"Times New Roman"">
mso-hansi-font-family:"Times New Roman"">使用命令为:
top –IPSH
mso-hansi-font-family:"Times New Roman"">解释:
-I
"Times New Roman""> 不显示idle
"Times New Roman"">状态的进程,这个选项在进程多的时候特别有用,特别是php-fpm
"Times New Roman"">等进程数量较多的场合。
-P
"Times New Roman""> 显示每个CPU
"Times New Roman"">的信息,像Linux
"Times New Roman"">中默认的一样。
-H
"Times New Roman"">显示线程信息,默认情况下,只显示进程信息,把所有线程统计都归属到相关的进程中去。
-S
"Times New Roman"">显示系统进程,默认情况下,像idle
"Times New Roman"">、swap
宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman"">、intr
mso-hansi-font-family:"Times New Roman"">(即中断)等系统进程并不显示,这个选项强制显示这些进程。
mso-hansi-font-family:"Times New Roman"">来个示例:
rt@te:/home/rt # top -HSPI
last pid: 18382; load averages: 0.14, 0.09, 0.08 up 7+03:06:37 20:57:07
87 processes: 9 running, 55 sleeping, 23 waiting
CPU 0: 0.0% user, 0.0% nice, 0.0% system, 2.4% interrupt, 97.6% idle
CPU 1: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle
CPU 2: 0.4% user, 0.0% nice, 0.4% system, 0.0% interrupt, 99.2% idle
CPU 3: 0.0% user, 0.0% nice, 0.4% system, 0.0% interrupt, 99.6% idle
CPU 4: 0.0% user, 0.0% nice, 0.4% system, 0.0% interrupt, 99.6% idle
CPU 5: 0.0% user, 0.0% nice, 0.4% system, 3.5% interrupt, 96.1% idle
CPU 6: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle
CPU 7: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle
Mem: 16M Active, 58M Inact, 398M Wired, 416M Buf, 3436M Free
Swap: 4096M Total, 4096M Free
PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND
10 root 155 ki31 0K 128K CPU4 4 169.9H 100.00% idle{idle: cpu4}
10 root 155 ki31 0K 128K CPU1 1 168.1H 100.00% idle{idle: cpu1}
10 root 155 ki31 0K 128K CPU7 7 167.9H 100.00% idle{idle: cpu7}
10 root 155 ki31 0K 128K CPU2 2 166.5H 100.00% idle{idle: cpu2}
10 root 155 ki31 0K 128K RUN 3 166.4H 100.00% idle{idle: cpu3}
10 root 155 ki31 0K 128K RUN 5 154.0H 100.00% idle{idle: cpu5}
10 root 155 ki31 0K 128K CPU6 6 166.7H 98.97% idle{idle: cpu6}
10 root 155 ki31 0K 128K CPU0 0 150.9H 98.63% idle{idle: cpu0}
11 root -92 - 0K 368K WAIT 0 18.1H 2.00% intr{irq267: em1:rx 0}
11 root -92 - 0K 368K WAIT 5 983:22 1.90% intr{irq264: em0:rx 0}
该贴由hui.chen转至本版2014-11-5 17:05:00