zoukankan      html  css  js  c++  java
  • IBM系统监控工具nmon命令详解(2)!

    原文链接http://blog.csdn.net/zq9017197/article/details/7068801
     

    首先看看nmon命令的帮助信息:

    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.                       每30秒1小时 ( 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 (mockbuild@x86-002.build.bos.redhat.com)                                                                                                              |  
    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. | CPU +-------------------------------------------------------------------------+                                                                                                              |  
    2. |100%-|          |                                                                                                                                                                             |  
    3. | 95%-|          |                                                                                                                                                                             |  
    4. | 90%-|          |                                                                                                                                                                             |  
    5. | 85%-|          |                                                                                                                                                                             |  
    6. | 80%-|          |                                                                                                                                                                             |  
    7. | 75%-|          |                                                                                                                                                                             |  
    8. | 70%-|          |                                                                                                                                                                             |  
    9. | 65%-|          |                                                                                                                                                                             |  
    10. | 60%-|          |                                                                                                                                                                             |  
    11. | 55%-|          |                                                                                                                                                                             |  
    12. | 50%-|          |                                                                                                                                                                             |  
    13. | 45%-|          |                                                                                                                                                                             |  
    14. | 40%-|          |                                                                                                                                                                             |  
    15. | 35%-|          |                                                                                                                                                                             |  
    16. | 30%-|          |                                                                                                                                                                             |  
    17. | 25%-|          |                                                                                                                                                                             |  
    18. | 20%-|          |                                                                                                                                                                             |  
    19. | 15%-|          |                                                                                                                                                                             |  
    20. | 10%-|          |                                                                                                                                                                             |  
    21. +---------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                                                                                                                                     |  
    11. |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|  
    从上面可以看见swap还100%没有使用,物理内存ram空闲38.2%,接着看 L (巨大的内存页面统计):
    1.  Large (Huge) Page Stats -----------------------------------------------------------------------------------------------------------------------------                                        |  
    2. |  There are no Huge Pages                                                                                                                                                                     |  
    3. |  - see /proc/meminfo                                                                                                                                                                         |  
    4. |                                                                                                                                                                                              |  
    5. |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|  
    这个东西我也没看太明白,接着看 j (文件系统):
    1. | Filesystems -----------------------------------------------------------------------------------------------------------------------------------------                                        |  
    2. |Filesystem            SizeMB  FreeMB  Use% Type     MountPoint                                                                                                                                |  
    3. |/dev/sda3              48502   36378   21% ext3     /                                                                                                                                         |  
    4. |/proc                      -       -     - proc     not a real filesystem                                                                                                                     |  
    5. |/sys                       -       -     - sysfs    not a real filesystem                                                                                                                     |  
    6. |/dev/pts                   -       -     - devpts   not a real filesystem                                                                                                                     |  
    7. |/dev/sda1                 99      82   12% ext3     /boot                                                                                                                                     |  
    8. |/dev/shm                   -       -     - tmpfs    not a real filesystem                                                                                                                     |  
    9. |/proc/sys/fs/binfmt_misc   -       -     - binfmt_m not a real filesystem                                                                                                                     |  
    10. |/var/lib/nfs/rpc_pipefs                    rpc_pipe size=zero blocks!                                                                                                                         |  
    11. |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|  
    这里可以看见磁盘的使用情况,非常直观,接着看 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同理如下。 nmon工具可以收集非常详细的系统信息,不过通常用的更多的是采样信息,来生成报表!!!
  • 相关阅读:
    matlab的变量判断是字符还是数字
    《误杀2》影评
    木心诗选
    Matlab查找一个元素在向量或矩阵中的位置
    数据什么时候需要做中心化和标准化处理?
    The Elements of Statistical Learning
    matlab如何将一个矩阵的任意两行或两列交换
    三次多项式和三次样条曲线的区别
    redis如何设置密码
    阿里云LAMP 环境
  • 原文地址:https://www.cnblogs.com/zuola/p/6423186.html
Copyright © 2011-2022 走看看