性能測試中的nnmon使用

一、先看幫助信息

  1. [root@linux nmon]# ./nmon.sh -h  
  2.   
  3. Hint: nmon.sh [-h] [-s <seconds>] [-c <count>] [-f -d <disks> -t -r <name>] [-x]  
  4.   
  5.         -h            查看完整的說明信息,有兩種模式:a、命令行交互式模式 (h) b、對於數據收集模式 (-f)  
  6.         -f            電子表格的輸出格式 [注意:默認 -s300 -c288] 可選 (300秒*288次=86400秒=60*60*24=1天)  
  7.         -s <seconds>  刷新屏幕頻率的時間 [默認 2]  
  8.         -c <number>   刷新屏幕的次數 [默認 1000000]  
  9.         -d <disks>    to increase the number of disks [default 256]  
  10.         -t            spreadsheet includes top processes  
  11.         -x            capacity planning (每15分鐘1天 = -fdt -s 900 -c 96)  
  12.   
  13. 版本 - nmon 14g  
  14.   
  15. 對於命令行交互式模式  
  16.         -s <seconds>  刷新屏幕頻率的時間 [默認 2]  
  17.         -c <number>   刷新屏幕的次數 [默認 1000000]  
  18.         -g <filename> User Defined Disk Groups [hit g to show them]  
  19.                       - file = on each line: group_name <disks list> space separated  
  20.                       - like: database sdb sdc sdd sde  
  21.                       - upto 64 disk groups, 512 disks per line  
  22.                       - disks can appear more than once and in many groups  
  23.         -b            命令行交互模式的界面是黑色和白色 [默認的顏色]  
  24.         例如: nmon.sh -s 1 -c 100 (說明:在命令行交互模式下,每秒鐘刷新一次屏幕,總共採集100次)  
  25.   
  26. 對於數據收集模式 = 電子表格格式 (逗號分隔值)  
  27.         Note: use only one of f,F,z,x or X and make it the first argument  
  28.         -f            電子表格輸出格式 [注意: default -s300 -c288]  
  29.                          輸出文件是 <hostname>_YYYYMMDD_HHMM.nmon  
  30.         -F <filename> 等同於 -f 但是使用用戶提供的文件名  
  31.         -r <runname>  用於電子表格文件 [default hostname]  
  32.         -t            include top processes in the output  
  33.         -T            as -t plus saves command line arguments in UARG section  
  34.         -s <seconds>  採集數據的時間  
  35.         -c <number>   採集數據的次數  
  36.         -d <disks>    to increase the number of disks [default 256]  
  37.         -l <dpl>      disks/line default 150 to avoid spreadsheet issues. EMC=64.  
  38.         -g <filename> User Defined Disk Groups (see above) - see BBBG & DG lines  
  39.         -N            include NFS Network File System  
  40.         -I <percent>  Include process & disks busy threshold (default 0.1)  
  41.                       don't save or show proc/disk using less than this percent  
  42.         -m <directory> 生成的數據文件的路徑  
  43.         例如:在30秒的時間間隔收集的top procs,持續1小時  
  44.                  nmon.sh -f -t -r Test1 -s30 -c120  
  45.   
  46.         To load into a spreadsheet:  
  47.         sort -A *nmon >stats.csv  
  48.         transfer the stats.csv file to your PC  
  49.         Start spreadsheet & then Open type=comma-separated-value ASCII file  
  50.          The nmon analyser or consolidator does not need the file sorted.  
  51.   
  52. Capacity planning mode - use cron to run each day  
  53.         -x            sensible spreadsheet output for CP =  one day  
  54.                       每15分鐘1天 ( i.e. -ft -s 900 -c 96)  
  55.         -X            sensible spreadsheet output for CP = busy hour  
  56.                       每301小時 ( i.e. -ft -s 30 -c 120)  
  57.   
  58. 交互模式命令  
  59.         key --- Toggles to control what is displayed ---  
  60.         h   = 聯機幫助信息  
  61.         r   = 機器類型,機器名,緩存信息和OS版本+LPAR  
  62.         c   = CPU處理器統計條形圖  
  63.         l   = 條形圖長期CPU(超過75個快照)  
  64.         m   = 內存統計  
  65.         L   = 巨大的內存頁面統計  
  66.         V   = 虛擬內存和交換統計  
  67.         k   = 內核內部統計  
  68.         n   = 網絡統計和錯誤  
  69.         N   = NFS網絡文件系統  
  70.         d   = 磁盤I/O圖  
  71.         D   = 磁盤I/O統計  
  72.         o   = 磁盤I/O映射(每個磁盤上的一個字符顯示它是多麼繁忙)  
  73.         j   = 文件系統  
  74.         t   = 頂級進程統計使用1,3,4,5來選擇數據及順序  
  75.         u   = 頂級進程命令的詳細信息  
  76.         v   = 詳細簡單的檢查 - OK/Warn(警告)/Danger(危險)  
  77.         b   = 黑白模式(或使用- b選項)  
  78.         .   = 最小模式,即只顯示繁忙的磁盤和進程  
  79.   
  80.         key --- Other Controls ---  
  81.         +   = 雙屏幕刷新時間  
  82.         -   = 一半的屏幕刷新時間  
  83.         q   = 退出 (also x, e or control-C)  
  84.         0   = 零峯計數復位 (峯值 = ">")  
  85.         space = 立即刷新屏幕  
  86.   
  87. Startup Control  
  88.         If you find you always type the same toggles every time you start  
  89.         then place them in the NMON shell variable. For example:  
  90.          export NMON=cmdrvtan  
  91.   
  92. Others:  
  93.         a) To you want to stop nmon - kill -USR2 <nmon-pid>  
  94.         b) Use -p and nmon outputs the background process pid  
  95.         c) To limit the processes nmon lists (online and to a file)  
  96.            Either set NMONCMD0 to NMONCMD63 to the program names  
  97.            or use -C cmd:cmd:cmd etc. example: -C ksh:vi:syncd  
  98.         d) If you want to pipe nmon output to other commands use a FIFO:  
  99.            mkfifo /tmp/mypipe  
  100.            nmon -F /tmp/mypipe &  
  101.            grep /tmp/mypipe  
  102.         e) If nmon fails please report it with:  
  103.            1) nmon version like: 14g  
  104.            2) the output of cat /proc/cpuinfo  
  105.            3) some clue of what you were doing  
  106.            4) I may ask you to run the debug version  
  107.   
  108.         Developer Nigel Griffiths  
  109.         Feedback welcome - on the current release only and state exactly the problem  
  110.         No warranty given or implied. 
在操作系統下面輸入如下命令就會進到nmon的監控界面:

  1. root@linux nmon]# ./nmon.sh  
  2. +nmon-14g------[H for help]---Hostname=linux--------Refresh= 2secs ---04:22.50-----------------------------------------------------------------------------------------------------------------+  
  3. |                                                                                                                                                                                              |  
  4. |  ------------------------------       For help type H or ...                                                                                                                                 |  
  5. |  #    #  #    #   ####   #    #        nmon -?  - hint                                                                                                                                       |  
  6. |  ##   #  ##  ##  #    #  ##   #        nmon -h  - full                                                                                                                                       |  
  7. |  # #  #  # ## #  #    #  # #  #                                                                                                                                                              |  
  8. |  #  # #  #    #  #    #  #  # #       To start the same way every time                                                                                                                       |  
  9. |  #   ##  #    #  #    #  #   ##        set the NMON ksh variable                                                                                                                             |  
  10. |  #    #  #    #   ####   #    #                                                                                                                                                              |  
  11. |  ------------------------------                                                                                                                                                              |  
  12. |                                                                                                                                                                                              |  
  13. |  Use these keys to toggle statistics on/off:                                                                                                                                                 |  
  14. |     c = CPU        l = CPU Long-term   - = Faster screen updates                                                                                                                             |  
  15. |     m = Memory     j = Filesystems     + = Slower screen updates                                                                                                                             |  
  16. |     d = Disks      n = Network         V = Virtual Memory                                                                                                                                    |  
  17. |     r = Resource   N = NFS             v = Verbose hints                                                                                                                                     |  
  18. |     k = kernel     t = Top-processes   . = only busy disks/procs                                                                                                                             |  
  19. |     h = more options                   q = Quit                                                                                                                                              |  
  20. |-----------------------------------------------------------------------------------------------------------------------
在這裏就可以看見一些指令的介紹和一些信息,其中 Refresh= 2secs 就是表示監控界面2秒鐘刷新一次,也可以在nmon命令後面跟 -s 參數來指定想要刷新的頻率,輸入 h 可以看見更詳細指令的介紹:

  1. +nmon-14g------[H for help]---Hostname=linux--------Refresh= 2secs ---04:27.49-----------------------------------------------------------------------------------------------------------------+  
  2. | HELP ------------------------------------------------------------------------------------------------------------------------------------------------                                        |  
  3. |     key  --- statistics which toggle on/off ---                                                                                                                                              |  
  4. |     h = This help information                                                                                                                                                                |  
  5. |     r = RS6000/pSeries CPU/cache/OS/kernel/hostname details + LPAR                                                                                                                           |  
  6. |     t = Top Process Stats 1=basic 3=CPU                                                                                                                                                      |  
  7. |         u = shows command arguments (hit twice to refresh)                                                                                                                                   |  
  8. |     c = CPU by processor             l = longer term CPU averages                                                                                                                            |  
  9. |     m = Memory & Swap stats L=Huge   j = JFS Usage Stats                                                                                                                                     |  
  10. |     n = Network stats                N = NFS                                                                                                                                                 |  
  11. |     d = Disk I/O Graphs D=Stats      o = Disks %Busy Map                                                                                                                                     |  
  12. |     k = Kernel stats & loadavg       V = Virtual Memory                                                                                                                                      |  
  13. |     g = User Defined Disk Groups [start nmon with -g <filename>]                                                                                                                             |  
  14. |     v = Verbose Simple Checks - OK/Warnings/Danger                                                                                                                                           |  
  15. |     b = black & white mode                                                                                                                                                                   |  
  16. |     --- controls ---                                                                                                                                                                         |  
  17. |     + and - = double or half the screen refresh time                                                                                                                                         |  
  18. |     q = quit                     space = refresh screen now                                                                                                                                  |  
  19. |     . = Minimum Mode =display only busy disks and processes                                                                                                                                  |  
  20. |     0 = reset peak counts to zero (peak = ">")                                                                                                                                               |  
  21. |     Developer Nigel Griffiths see http://nmon.sourceforge.net                                                                                                                                |  
  22. |-----------------------------------------------------------------------------------------------
在這裏可以看見所有輸入的指令,以及會看到什麼內容,這裏要說一下在nmon中輸入一次 h 會看見幫助信息,在敲一次 h 就會取消顯示了,其它指令也同理,這裏輸入 r (機器類型,機器名,緩存信息和OS版本+LPAR):

  1.  Linux and Processor Details -------------------------------------------------------------------------------------------------------------------------                                        |  
  2. |    Linux: Linux version 2.6.18-164.el5 ([email protected])                                                                                                              |  
  3. |    Build: (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46))                                                                                                                                    |  
  4. |    Release  : 2.6.18-164.el5                                                                                                                                                                 |  
  5. |    Version  : #1 SMP Tue Aug 18 15:51:54 EDT 2009                                                                                                                                            |  
  6. |    cpuinfo: model name : Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz                                                                                                                            |  
  7. |    cpuinfo: vendor_id : GenuineIntel                                                                                                                                                         |  
  8. |    cpuinfo: cpu MHz  : 2093.260                                                                                                                                                              |  
  9. |    cpuinfo: bogomips : 4186.52                                                                                                                                                               |  
  10. |    # of CPUs: 1       --1顆cpu                                                                                                                                                               |  
  11. |    Machine  : i686                                                                                                                                                                           |  
  12. |    Nodename : linux   --hostname                                                                                                                                                             |  
  13. |    /etc/*ease[1]: Red Hat Enterprise Linux Server release 5.4 (Tikanga)               --操作系統版本                                                                                         |  
  14. |    /etc/*ease[2]: (null)                                                                                                                                                                     |  
  15. |    /etc/*ease[3]: (null)                                                                                                                                                                     |  
  16. |    /etc/*ease[4]: (null)                                                                                                                                                                     |  
  17. |    lsb_release: Distributor ID:        RedHatEnterpriseServer                                                                                                                                |  
  18. |    lsb_release: Description:   Red Hat Enterprise Linux Server release 5.4 (Tikanga)                                                                                                         |  
  19. |    lsb_release: Release:       5.4                                                                                                                                                           |  
  20. |    lsb_release: Codename:      Tikanga                                                                                                                                                       |  
  21. +---------Warning: Some Statistics may not shown--------------------------------

在這裏看見一些主機和操作系統的信息,再敲一次 r 就會取消顯示了,然後輸入 t (頂級進程統計使用1,3,4,5來選擇數據及順序),然後再按數字 5 :

  1. Top Processes Procs=85 mode=5 (1=Basic, 3=Perf 4=Size 5=I/O)---------------------------------------------------------------------------------------------------------------------------------|  
  2. |  PID       %CPU    Size     Res    Res     Res     Res    Shared    Faults  Command                                                                                                          |  
  3. |             Used      KB     Set    Text    Data     Lib    KB     Min   Maj                                                                                                                 |  
  4. |     4050     0.5   12748   10548     108   10896       0   832     84      0 nmon.sh                                                                                                         |  
  5. |        1     0.0    2072     624      32     280       0   532      0      0 init                                                                                                            |  
  6. |        2     0.0       0       0       0       0       0     0      0      0 migration/0                                                                                                     |  
  7. |        3     0.0       0       0       0       0       0     0      0      0 ksoftirqd/0                                                                                                     |  
  8. |        4     0.0       0       0       0       0       0     0      0      0 watchdog/0                                                                                                      |  
  9. |        5     0.0       0       0       0       0       0     0      0      0 events/0                                                                                                        |  
  10. |        6     0.0       0       0       0       0       0     0      0      0 khelper                                                                                                         |  
  11. |        7     0.0       0       0       0       0       0     0      0      0 kthread                                                                                                         |  
  12. |       10     0.0       0       0       0       0       0     0      0      0 kblockd/0                                                                                                       |  
  13. |       11     0.0       0       0       0       0       0     0      0      0 kacpid                                                                                                          |  
  14. |       67     0.0       0       0       0       0       0     0      0      0 cqueue/0                                                                                                        |  
  15. |       70     0.0       0       0       0       0       0     0      0      0 khubd                                                                                                           |  
  16. |       72     0.0       0       0       0       0       0     0      0      0 kseriod                                                                                                         |  
  17. |      136     0.0       0       0       0       0       0     0      0      0 pdflush                                                                                                         |  
  18. |      137     0.0       0       0       0       0       0     0      0      0 pdflush                                                                                                         |  
  19. |      138     0.0       0       0       0       0       0     0      0      0 kswapd0                                                                                                         |  
  20. |      139     0.0       0       0       0       0       0     0      0      0 aio/0                                                                                                           |  
  21. +---------Warning: Some Statistics may not shown----------------------------
注意這個 mode=5 表示就是按I/O來排序了,這裏還可以選擇其它(1、3、4、5)方式排序,這裏可以看見系統有85個進程(Procs=85),5就是按佔用的cpu來排的降序,接着輸入 u (頂級進程命令的詳細信息):

  1. Top Processes Procs=85 mode=5 (1=Basic, 3=Perf 4=Size 5=I/O)---------------------------------------------------------------------------------------------------------------------------------|  
  2. |  PID    %CPU ResSize    Command                                             Command                                                                                                          |  
  3. |          Used      KB                                                                                                                                                                        |  
  4. |    4050   1.0   10660 ./nmon.sh                                                                                                                                                              |  
  5. |       1   0.0     624 init [3]                                                                                                                                                               |  
  6. |       2   0.0       0 [migration/0]                                                                                                                                                          |  
  7. |       3   0.0       0 [ksoftirqd/0]                                                                                                                                                          |  
  8. |       4   0.0       0 [watchdog/0]                                                                                                                                                           |  
  9. |       5   0.0       0 [events/0]                                                                                                                                                             |  
  10. |       6   0.0       0 [khelper]                                                                                                                                                              |  
  11. |       7   0.0       0 [kthread]                                                                                                                                                              |  
  12. |      10   0.0       0 [kblockd/0]                                                                                                                                                            |  
  13. |      11   0.0       0 [kacpid]                                                                                                                                                               |  
  14. |      67   0.0       0 [cqueue/0]                                                                                                                                                             |  
  15. |      70   0.0       0 [khubd]                                                                                                                                                                |  
  16. |      72   0.0       0 [kseriod]                                                                                                                                                              |  
  17. |     136   0.0       0 [pdflush]                                                                                                                                                              |  
  18. |     137   0.0       0 [pdflush]                                                                                                                                                              |  
  19. |     138   0.0       0 [kswapd0]                                                                                                                                                              |  
  20. |     139   0.0       0 [aio/0]                                                                                                                                                                |  
  21. +---------Warning: Some Statistics may not shown---------

以上信息都很直觀,我就不在多說了,接着看 c  (CPU處理器統計條形圖):

  1. CPU Utilisation -------------------------------------------------------------------------------------------------------------------------------------                                        |  
  2. |---------------------------+-------------------------------------------------+                                                                                                                |  
  3. |CPU  User%  Sys% Wait% Idle|0          |25         |50          |75       100|                                                                                                                |  
  4. |  1   0.0   0.0   0.0 100.0| >                                               |                                                                                                                |  
  5. |---------------------------+-------------------------------------------------+                                                                                                                |  
  6. |---------------------------------------------------------------------------------

從上面可以看見系統非常閒(Idle=100%),其中“>”代表的是系統最高cpu的使用峯值,如果按數字0就會重置峯值爲0了,接着看 l   (條形圖長期CPU):

  1. 100%-|          |                                                                                                                                                                             |  
  2. | 95%-|          |                                                                                                                                                                             |  
  3. | 90%-|          |                                                                                                                                                                             |  
  4. | 85%-|          |                                                                                                                                                                             |  
  5. | 80%-|          |                                                                                                                                                                             |  
  6. | 75%-|          |                                                                                                                                                                             |  
  7. | 70%-|          |                                                                                                                                                                             |  
  8. | 65%-|          |                                                                                                                                                                             |  
  9. | 60%-|          |                                                                                                                                                                             |  
  10. | 55%-|          |                                                                                                                                                                             |  
  11. | 50%-|          |                                                                                                                                                                             |  
  12. | 45%-|          |                                                                                                                                                                             |  
  13. | 40%-|          |                                                                                                                                                                             |  
  14. | 35%-|          |                                                                                                                                                                             |  
  15. | 30%-|          |                                                                                                                                                                             |  
  16. | 25%-|          |                                                                                                                                                                             |  
  17. | 20%-|          |                                                                                                                                                                             |  
  18. | 15%-|          |                                                                                                                                                                             |  
  19. | 10%-|          |                                                                                                                                                                             |  
  20. +---------Warning: Some Statistics may not shown-
也是cpu使用情況的另一種顯示,其中“|”和上面的“>”原理一樣,接着看 m(內存統計):

  1.  Memory Stats ----------------------------------------------------------------------------------------------------------------------------------------                                        |  
  2. |                RAM     High      Low     Swap    Page Size=4 KB                                                                                                                              |  
  3. | Total MB       503.3      0.0    503.3   1027.6                                                                                                                                              |  
  4. | Free  MB       192.3      0.0    192.3   1027.6                                                                                                                                              |  
  5. | Free Percent    38.2%     0.0%    38.2%   100.0%                                                                                                                                             |  
  6. |             MB                  MB                  MB                                                                                                                                       |  
  7. |                      Cached=   200.6     Active=   107.4                                                                                                                                     |  
  8. | Buffers=    46.4 Swapcached=     0.0  Inactive =   169.7                                                                                                                                     |  
  9. | Dirty  =     0.2 Writeback =     0.0  Mapped   =     9.5                                                                                                                                     |  
  10. | Slab   =    26.8 Commit_AS =   130.0 PageTables=     1.3               

從上面可以看見swap還100%沒有使用,物理內存ram空閒38.2%,接着看 L (巨大的內存頁面統計):

  1. arge (Huge) Page Stats -----------------------------------------------------------------------------------------------------------------------------                                        |  
  2. |  There are no Huge Pages                                                                                                                                                                     |  
  3. |  - see /proc/meminfo                                                                                                                                                                         |  
  4. |                         
這裏可以看見磁盤的使用情況,非常直觀,接着看 n (網絡統計和錯誤):

  1.  Network I/O -----------------------------------------------------------------------------------------------------------------------------------------                                        |  
  2. |I/F Name Recv=KB/s Trans=KB/s packin packout insize outsize Peak->Recv Trans                                                                                                                  |  
  3. |      lo     0.0     0.0       0.0      0.0     0.0    0.0        0.2     0.2                                                                                                                 |  
  4. |    eth0     0.0     0.1       0.5      0.5    60.0  218.0       52.4    99.0                                                                                                                 |  
  5. |    sit0     0.0     0.0       0.0      0.0     0.0    0.0        0.0     0.0                                                                                                                 |  
  6. | Network Error Counters ------------------------------------------------------------------------------------------------------------------------------                                        |  
  7. |I/F Name iErrors iDrop iOverrun iFrame oErrors   oDrop oOverrun oCarrier oColls                                                                                                               |  
  8. |      lo       0       0       0       0       0       0       0       0       0                                                                                                              |  
  9. |    eth0       0       0       0       0       0       0       0       0       0                                                                                                              |  
  10. |    sit0       0       0       0       0       0       0       0       0       0                                                                                                              |  
  11. |-------------------------------------------------------------------------------------

接着看 N (NFS網絡文件系統):

  1. | Network Filesystem (NFS) I/O Operations per second --------------------------------------------------------------------------------------------------                                        |  
  2. | Version 2       Client   Server         Version 3      Client   Server                                                                                                                       |  
  3. |           null      0.0      0.0                null      0.0      0.0                                                                                                                       |  
  4. |        getattr      0.0      0.0             getattr      0.0      0.0                                                                                                                       |  
  5. |        setattr      0.0      0.0             setattr      0.0      0.0                                                                                                                       |  
  6. |           root      0.0      0.0              lookup      0.0      0.0                                                                                                                       |  
  7. |         lookup      0.0      0.0              access      0.0      0.0                                                                                                                       |  
  8. |       readlink      0.0      0.0            readlink      0.0      0.0                                                                                                                       |  
  9. |           read      0.0      0.0                read      0.0      0.0                                                                                                                       |  
  10. |        wrcache      0.0      0.0               write      0.0      0.0                                                                                                                       |  
  11. |          write      0.0      0.0              create      0.0      0.0                                                                                                                       |  
  12. |         create      0.0      0.0               mkdir      0.0      0.0                                                                                                                       |  
  13. |         remove      0.0      0.0             symlink      0.0      0.0                                                                                                                       |  
  14. |         rename      0.0      0.0               mknod      0.0      0.0                                                                                                                       |  
  15. |           link      0.0      0.0              remove      0.0      0.0                                                                                                                       |  
  16. |        symlink      0.0      0.0               rmdir      0.0      0.0                                                                                                                       |  
  17. |          mkdir      0.0      0.0              rename      0.0      0.0                                                                                                                       |  
  18. |          rmdir      0.0      0.0                link      0.0      0.0                                                                                                                       |  
  19. |        readdir      0.0      0.0             readdir      0.0      0.0                                                                                                                       |  
  20. |         fsstat      0.0      0.0         readdirplus      0.0      0.0                                                                                                                       |  
  21. +---------Warning: Some Statistics may not shown----------------------------------------

接着看 d  (磁盤I/O圖):

  1. | Disk I/O --/proc/diskstats----mostly in KB/s-----Warning:contains duplicates-------------------------------------------------------------------------                                        |  
  2. |DiskName Busy  Read WriteKB|0          |25         |50          |75       100|                                                                                                                |  
  3. |sda        0%    0.0    0.0|>                                                |                                                                                                                |  
  4. |sda1       0%    0.0    0.0|>                                                |                                                                                                                |  
  5. |sda2       0%    0.0    0.0|>                                                |                                                                                                                |  
  6. |sda3       0%    0.0    0.0|>                                                |                                                                                                                |  
  7. |Totals Read-MB/s=0.0      Writes-MB/s=0.0      Transfers/sec=0.0                                                                                                                              |  
  8. |--------------------------------------------------------------

接着看 D (磁盤I/O統計):

  1. Disk I/O --/proc/diskstats----mostly in KB/s-----Warning:contains duplicates-------------------------------------------------------------------------                                        |  
  2. |DiskName Busy    Read    Write       Xfers   Size  Peak%  Peak-RW    InFlight                                                                                                                 |  
  3. |sda        0%      0.0      0.0KB/s    0.0   0.0KB    0%       8.0KB/s   0   |                                                                                                                |  
  4. |sda1       0%      0.0      0.0KB/s    0.0   0.0KB    0%       0.0KB/s   0   |                                                                                                                |  
  5. |sda2       0%      0.0      0.0KB/s    0.0   0.0KB    0%       0.0KB/s   0   |                                                                                                                |  
  6. |sda3       0%      0.0      0.0KB/s    0.0   0.0KB    0%       8.0KB/s   0   |                                                                                                                |  
  7. |Totals Read-MB/s=0.0      Writes-MB/s=0.0      Transfers/sec=0.0                                                                                                                              |  
  8. |------------------------------------------------------

接着看 o  (磁盤I/O映射):

  1. | Disk %Busy Map --Key: @=90 #=80 X=70 8=60 O=50 0=40 o=30 +=20 -=10 .=5 _=0%--------------------------------------------------------------------------                                        |  
  2. |             Disk No.  1         2         3         4         5         6                                                                                                                    |  
  3. |Disks=4      0123456789012345678901234567890123456789012345678901234567890123                                                                                                                 |  
  4. |disk 0 to 63 ____                                                                                                                                                                             |  
  5. |---------------

接着看 k  (內核內部統計)

  1. | Kernel Stats ----------------------------------------------------------------------------------------------------------------------------------------                                        |  
  2. | RunQueue              1   Load Average    CPU use since boot time                                                                                                                            |  
  3. | ContextSwitch   30228.5    1 mins  0.00    Uptime Days=  0 Hours= 2 Mins=29                                                                                                                  |  
  4. | Forks              25.9    5 mins  0.00    Idle   Days=  0 Hours= 2 Mins=28                                                                                                                  |  
  5. | Interrupts     738415.7   15 mins  0.00    Average CPU use=  0.98%                                                                                                                           |  
  6. |----------------------------------------------------------------------------------

接着看 V (虛擬內存和交換統計):

  1. | Virtual-Memory --------------------------------------------------------------------------------------------------------------------------------------                                        |  
  2. |nr_dirty    =        0 pgpgin      =       0                High Normal    DMA                                                                                                                |  
  3. |nr_writeback=        0 pgpgout     =       0  alloc            0      0      0                                                                                                                |  
  4. |nr_unstable =        0 pgpswpin    =       0  refill           0      0      0                                                                                                                |  
  5. |nr_table_pgs=      330 pgpswpout   =       0  steal            0      0      0                                                                                                                |  
  6. |nr_mapped   =     2438 pgfree      =       0  scan_kswapd      0      0      0                                                                                                                |  
  7. |nr_slab     =     6852 pgactivate  =       0  scan_direct      0      0      0                                                                                                                |  
  8. |                       pgdeactivate=       0                                                                                                                                                  |  
  9. |allocstall  =        0 pgfault     =       7  kswapd_steal     =      0                                                                                                                       |  
  10. |pageoutrun  =        0 pgmajfault  =       0  kswapd_inodesteal=      0                                                                                                                       |  
  11. |slabs_scanned=       0 pgrotated   =       0  pginodesteal     =      0                                                                                                                       |  
  12. |-----------------------------------------------------------------
接着看 v (詳細簡單的檢查):

  1. | Verbose Mode ----------------------------------------------------------------------------------------------------------------------------------------                                        |  
  2. | Code    Resource            Stats   Now        Warn    Danger                                                                                                                                |  
  3. |     OK -> CPU               %busy   0.0%       >80%    >90%                                                                                                                                  |  
  4. |     OK -> Top Disk          %busy   0.0%       >40%    >60%                                                                                                                                  |  
  5. |                                                                                                                                                                                              |  
  6. |                                                                                                                                                                                              |  
  7. | HELP ------------

這裏顯示了cpu和disk的一個診斷信息,Warn(警告)/Danger(危險),可以看見cpu大於80%就是警告,大於90%就是危險,disk同理如下。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章