Chinaunix

标题: nmon [打印本页]

作者: chucknancy    时间: 2006-01-16 15:46
标题: nmon

http://www-128.ibm.com/developerworks/eserver/articles/analyze_aix/

nmon performance: A free tool to analyze AIX and Linux performance




Document options


Document options requiring JavaScript are not displayed
New site feature


Plan and design IT solutions with our new Architecture area
-->
Rate this page


Help us improve this content
Level: Intermediate
Nigel Griffiths
(
[email=nag@uk.ibm.com?subject=nmon performance: A free tool to analyze AIX and Linux performance&cc=mmccrary@us.ibm.com]nag@uk.ibm.com[/email]
), Technical Support, IBM
04 Nov 2003
Updated 15 Nov 2005
This free tool gives you a huge amount of information all on one screen. Even though IBM doesn't officially support the tool and you must use it at your own risk, you can get a wealth of performance statistics. Why use five or six tools when one free tool can give you everything you need?
Usage notes: This nmon tool is NOT OFFICIALLY SUPPORTED. No warrantee is given or implied, and you cannot obtain help with it from IBM.
The nmon tool runs on:

The nmon tool is updated roughly every six months, or when new operating system releases are available. To place your name on the e-mail list for updates, contact Nigel Griffiths.
Use this tool together with
nmon analyser
, which loads the nmon output file and automatically creates dozens of graphs.
Introduction
The nmon tool is designed for AIX and Linux performance specialists to use for monitoring and analyzing performance data, including:

Also included is a new tool to generate graphs from the nmon output and create .gif files that can be displayed on a Web site.
See the
README
file for more details.


Back to top
Benefits of the tool
The nmon tool is helpful in presenting all the important performance tuning information on one screen and dynamically updating it. This efficient tool works on any dumb screen, telnet session, or even a dial-up line. In addition, it does not consume many CPU cycles, usually below two percent. On newer machines, CPU usage is well below one percent.
Data is displayed on the screen and updated once every two seconds, using a dumb screen. However, you can easily change this interval to a longer or shorter time period. If you stretch the window and display the data on X Windows, VNC, PuTTY, or similar, the nmon tool can output a great deal of information in one place.
The nmon tool can also capture the same data to a text file for later analysis and graphing for reports. The output is in a spreadsheet format (.csv).


Back to top
Installing the tool
The tool is a stand-alone binary file (a different file for each AIX or Linux version) that you can install in five seconds, probably less if you type fast. Installation is simple:

Extra notes for using nmon 9 for AIX 4 only
  • You must be the root user or allow regular users to read the /dev/kmem file by typing the following command (as root):
    chmod ugo+r /dev/kmem
  • If you want the disk statistics, then also run (as root):
    chdev -l sys0 -a iostat=true
    How to run the tool interactively
    For running the tool interactively, read the front page of the file for a few hints. Then start the tool and use the one-key commands to see the data you want. For example, to get CPU, Memory, and Disk statistics, start nmon and type:
    cmd
    How to get help information while running interactively
    Press the h key.
    Additional help information
    For additonal help information, try the following:

    How to capture the data to a file for later analysis and graphing
    Run nmon with the -f flag. See nmon -h for the details. But as an example, try to run nmon for an hour capturing data snapshots every 30 seconds by using:         
    nmon -f -s 30 -c 120
    nmon -fT -s 30 -c 120
    The second line also captures the top processes. Both of these create the output file in the current directory called:         
    _date_time.nmon
    This file is in a comma-separated values (CVS) format and can be imported into a spreadsheet directly. If you are using Lotus® 1-2-3, the file needs to be sorted. (This is not required for the Excel version of the nmon analyser.) On AIX, follow this example:         
    sort -A mymachine_311201_1030.nmon > xxx.csv
    Notes to save you time:



    Back to top
    New features for nmon on AIX Version 10
    New Features
    Description
    Starting up
    There is also now a small shell script called "nmon" that starts the right nmon version. Place this script and nmon binaries in your $PATH and type: nmon. This version is now only compiled in 32-bit mode. So, it runs on 32- and 64-bit hardware. The idea is to make it easier to install and run.
    N = NFS
    NFS is completely new for nmon 10.
    p = Partitions
    This is for shared CPU partitions information -- the big p5/AIX5.3 feature.
    C = CPU
    This is for machines with 32 plus CPUs -- up to 128 logical CPUs by demand.
    c = CPU
    Details your physical CPU use -- if you are on a POWER5 with AIX 5.3 and in a shared CPU environment.
    S = Subclass
    This is for WLM subclasses -- by request.
    a = Disk adapters
    Gives you details of the disk adapter -- like their full type.
    r = Resources
    This includes your CPU speed in MHz.
    k = Kernel
    Gives some new fields.
    L = Large pages
    Gives you large-page stats -- popular with high-performance guys.
    D = Disk
    Gives you more information about your disks, disk type sizes, free, volume groups, adapter, and so forth.
    n = Network
    Gives you information about your network adapters details, MTU, and errors.
    m = Memory
    Gives you more details on where your memory is going, system (kernel) and processes, and active virtual memory.
    -B
    This is a start-up option to remove the boxes.


    Back to top


    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/8211/showart_68291.html




    欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2