[huangc@V-02-01-00860~]$top
top-15:17:44up78days??5:17??13users??loadaverage:0.00??0.10??0.12
Tasks:227total??1running??225sleeping??1stopped??0zombie
Cpu(s):7.8%us??12.1%sy??0.0%ni??79.9%id??0.0%wa??0.0%hi??0.2%si??0.0%st
Mem:8193720ktotal??6315000kused??1878720kfree??47436kbuffers
Swap:4128760ktotal??3852496kused??276264kfree??5054928kcached
PIDUSERPRNIVIRTRESSHRS%CPU%MEMTIME+COMMAND
2301seeproxy2002196m13m660S15.50.215285:39/home/seeproxy/seeproxy/python27/bin/python/home/seeproxy/seeproxy/seeproxy.p
30824huangc200872m17441096S7.30.064:05.38hsserver-fwarmstandby_hc.xml-startproxysvr-tar-s1-status0
32729zhouds2001958m41m936S4.60.562:54.17hsserver-ffront_demo.xml-startmainsvr-tar-s0-status0
32740zhouds2002818m35m736S4.60.471:29.01/home/zhouds/linux.x64/bin/hsserver-fqueue_demo.xml-tar-s0-d/home/zhou
1307shizj200144g335m800S4.04.260:50.38hsserver-fshizj_uft.xml-startmainsvr-tar-s0-uft_status1-system_type
498zhouds2002722m48m5920S3.30.646:57.94hsserver-fuft_demo.xml-startmainsvr-tar-s0-status0-system_type0-l
1496shizj20026.6g11m1188S3.30.143:37.45hsserver-fshizj_init.xml-startmainsvr-tar-s0-status0
30829huangc2001355m19m796S3.30.245:27.38/home/huangc/linux.x64/bin/hsserver-fwarmstandby_hc.xml-tar-s1-d/home/
1303shizj2001286m6120728S2.30.130:22.74hsserver-fshizj_arb.xml-startarbsvr-tar-s0-status0
32723zhouds2001234m17m668S2.30.233:27.00hsserver-farb_demo.xml-startarbsvr-tar-s0-status0
32725zhouds200614m632392S1.60.017:38.62hsserver-fqueue_demo.xml-startproxysvr-tar-s0-status0
13284huangc200150361336948R1.00.00:00.10top
1341root2008229214121104S0.30.0154:38.71/usr/sbin/vmtoolsd
1750root20013584288220S0.30.015:07.26lldpad-d
1root20019364312136S0.00.00:15.99/sbin/init
2root200000S0.00.00:00.68[kthreadd]
3rootRT0000S0.00.00:10.29[migration/0]
4root200000S0.00.036:04.74[ksoftirqd/0]
5rootRT0000S0.00.00:00.00[migration/0]
[huangc@V-02-01-00860~]$
????top?????????а????????????
????· ?? 1 ???????????????????????????? ??????????????????е??????? ???????????? ??? 3 ??????????????? 1min ?? 5min ?? 15min ????????е?????????????????????????
????· ?? 2 ?и?????????????????????? top ??????????θ?????????????е???? ?????? ????л????????е????? ?????е????? ????????????????????????
????· ?? 3 ?к?? 4 ????????? CPU ?????????????????????? ??????? niced ???? ??????н????????? CPU ???????
????· ?? 5 ??????????????????????????????????????????????????????????? ??????????????????????????????????
????· ?? 6 ?????????????????????????????????????????????????????? С?????е????????С???????????????С??
????????????????????????????????Щ??????? top
?????????????????
????· d ???????????????
????· p ??????????????????????? 20 ???????
????· S ?????????????????????????????????????????????????
????· I ????????н?????????
????· H ????????????????????
????· N ?????????????
????top ???????????????????????????????? F ??????????????????? J ???? ???????????????????????????е????????? CPU???
????????sar????
????sar ?? sysstat ???????????????????????????????й????????????? CPU ??????? ???????л????ж?????? ???????????????? ??????????????? ????????????????????????? ?? sar(1)
?????????????? ?????????????????????????????????????У? ????п???????????????????????????????????????????? ??
????sar ???????????????????????????????????????仯?? sar ????????????????????????????????????????????????? vmstat ?????????????????????????? sar ???????????????? ( ???????λ ) ???????????????????????????? sar??????????????????????????????
????1??CPU??????
[huangc@V-02-01-00860 ~]$ sar -u -P ALL -C 5
Linux 2.6.32-431.el6.x86_64 (V-02-01-00860)  10/12/16  _x86_64_ (2 CPU)
15:50:19        CPU     %user     %nice   %system   %iowait    %steal     %idle
15:50:24        all      3.38      0.00      5.28      0.00      0.00     91.34
15:50:24          0      3.39      0.00      5.30      0.00      0.00     91.31
15:50:24          1      3.36      0.00      5.25      0.00      0.00     91.39
15:50:24        CPU     %user     %nice   %system   %iowait    %steal     %idle
15:50:29        all      3.17      0.00      4.66      0.00      0.00     92.17
15:50:29          0      3.40      0.00      4.25      0.00      0.00     92.36
15:50:29          1      2.75      0.00      5.08      0.00      0.00     92.16
15:50:29        CPU     %user     %nice   %system   %iowait    %steal     %idle
15:50:34        all      2.95      0.00      5.16      0.00      0.00     91.89
15:50:34          0      3.36      0.00      5.25      0.00      0.00     91.39
15:50:34          1      2.75      0.00      4.86      0.00      0.00     92.39
??????????????????????? CPU ??????????????????????? I/O ????? ??????豸????????????????????????ж???????? I/O ????????ɡ? ??????????Щ?ж???м????? ???????????????????????????? I/O ????????? sar(1) ?????????????????????????????????ж???????и????????????????????????????????????????仯????????“ -I SUM ” ????????????????????????????ж????????“ -I ALL ” ???????????ж??????????? ( δ??? )??
????2???ж?????
10:53:53 INTR intr/s
10:53:58 sum 4477.60
10:54:03 sum 6422.80
10:54:08 sum 6407.20
10:54:13 sum 6111.4010:54:18 sum 6095.40
10:54:23 sum 6104.81
10:54:28 sum 6149.80
. . .
Average: sum 4416.5
?????? ??????? sar -A ????????? CPU ???ж?????? ( ??????????????????????? ) ????????? IRQ ??? 0 ?? 1 ?? 2 ?? 9 ?? 12 ?? 14 ?? 17 ?? 18 ?? 21 ?? 23 ?? 24 ?? 25??
????3???ж???
?????ж??????о??????????ж????????е??????????????????????????з???????????????????????????????豸???ж? ( ?? IRQ) ???????????? CPU ????? CPU ??????????? IRQ
????????????????????????????????????? ??
?????磬???
????0x0001 ??????? /proc/irq/ID( ???? ID ?????????豸 ) ??????? CPU 0 ???????豸?? IRQ ????? 0x000f ??????? /proc/irq/ID ???? CPU 0 ?? CPU 3 ??????????豸?? IRQ ???????Щ???????????????????????????????????????????????????????????????????????Ч????? I/O ?ж????????????? I/O ???? ??