Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

Embed Size (px)

Citation preview

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    1/19

    Share:

    Develop and deploy your next

    app on the IBM Bluemixcloud platform.

    Start building for free

    This free tool gives you a huge amount of information all on one screen. Even though IBM doesn't officially support thetool and you must use it at your own risk, you can get a wealth of performance statistics. Why use five or six toolswhen one free tool can give you everything you need?

    Nigel Griffiths works in the IBM eServer® pSeries Technical Support Advanced Technology Group. He specialises in performance, sizing,tools, benchmarks, and Oracle RDBMS. Thenmon tool was developed to support benchmarks and performance tuning for internal use, but bypopular demand is given away to deserving friends. If you have a question onnmon , please go on the Performance Tools Forum site (seeResources ) so that others can find and benefit from the answers. To protect your email address from junk mail, you need to create a USER IDfirst (takes 20 seconds at most).

    27 February 2006 (First published 04 November 2003) Also available inChinese Russian

    Usage notes: This nmon tool is NOT OFFICIALLY SUPPORTED. Nowarrantee is given or implied, and you cannot obtain help with it from IBM. If you have a question on nmon , please go on the Performance Tools Forumsite (see Resources ) so that others can find and benefit from the answers.To protect your email address from junk mail, you need to create a USER IDfirst (takes 20 seconds at most).

    The nmon tool runs on:

    developerWorks Technical topics AIX and UNIX Technical library

    nmon performance: A free tool to analyze AIX and

    Linux performance

    http://www.ibm.com/developerworks/ru/library/au-analyze_aix/http://www.ibm.com/developerworks/aix/library/http://void%280%29/http://void%280%29/https://www.bluemix.net/?cm_mmc=dw-_-bluemix-_-au-analyze_aix-_-sidebarhttp://void%280%29/http://www.ibm.com/developerworks/http://www.ibm.com/developerworks/aix/http://www.ibm.com/developerworks/topics/http://void%280%29/http://www.ibm.com/developerworks/cn/aix/library/analyze_aix/

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    2/19

    AIX® 4.1.5, 4.2.0 , 4.3.2, and 4.3.3 (nmon Version 9a: This version is functionally established and willnot be developed further.)

    AIX 5.1, 5.2, and 5.3 (nmon Version 10: This version now supports AIX 5.3 and POWER5™ processor-based machines, with SMT and shared CPU micro-partitions.)

    Linux® SUSE SLES 9, Red Hat EL 3 and 4, Debian on pSeries® p5, and OpenPower™

    Linux SUSE, Red Hat, and many recent distributions on x86 (Intel and AMD in 32-bit mode)

    Linux SUSE and Red Hat on zSeries® or mainframe

    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 (seeResources ), which loads thenmon output file andautomatically creates dozens of graphs.

    IntroductionThe nmon tool is designed for AIX and Linux performance specialists to use for monitoring and analyzingperformance data, including:

    CPU utilization

    Memory use

    Kernel statistics and run queue information

    Disks I/O rates, transfers, and read/write ratios

    Free space on file systems

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    3/19

    Disk adapters

    Network I/O rates, transfers, and read/write ratios

    Paging space and paging rates

    CPU and AIX specificationTop processors

    IBM HTTP Web cache

    User-defined disk groups

    Machine details and resources

    Asynchronous I/O -- AIX only

    Workload Manager (WLM) -- AIX only

    IBM TotalStorage® Enterprise Storage Server® (ESS) disks -- AIX only

    Network File System (NFS)

    Dynamic LPAR (DLPAR) changes -- only pSeries p5 and OpenPower for either AIX or Linux

    Also included is a new tool to generate graphs from thenmon output and create .gif files that can bedisplayed on a Web site.

    See the README file for more details.

    Benefits of the tool

    The nmon tool is helpful in presenting all the important performance tuning information on one screen and

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    4/19

    dynamically updating it. This efficient tool works on any dumb screen, telnet session, or even a dial-upline. 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 anddisplay the data on X Windows, VNC, PuTTY, or similar, thenmon 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. Theoutput is in a spreadsheet format (.csv).

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

    Copy the nmonXXX.tar.Z file to the machine. If using FTP, remember to use binary mode.Note: Version XXX replaces this example.

    To uncompress the file, rununcompress nmonXX.tar.Z .

    To extract the files, runtar xvf nmonXX.tar .

    Read the README file.

    To start the nmon tool, typenmon .

    If you are the root user, you might need to type./nmon .

    Extra notes for using nmon 9 for AIX 4 only

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    5/19

    1. You must be the root user or allow regular users to read the /dev/kmem file by typing the followingcommand (as root):chmod ugo+r /dev/kmem

    2. If you want the disk statistics, then also run (as root):chdev -l sys0 -a iostat=true

    How to run the tool interactivelyFor running the tool interactively, read the front page of the file for a few hints. Then start the tool and usethe one-key commands to see the data you want. For example, to getCPU , Memory , and Disk statistics,start nmon and type:cmd

    How to get help information while running interactivelyPress the h key.

    Additional help informationFor additonal help information, try the following:

    Type the nmon -? command for brief details.

    Type the nmon -h command for full details.Read the README file.

    How to capture the data to a file for later analysis and graphingRun nmon with the -f flag. Seenmon -h for the details. But as an example, try to runnmon for an hour capturing data snapshots every 30 seconds by using: Â Â Â Ânmon -f -s 30 -c 120nmon -fT -s 30 -c 120

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    6/19

    The second line also captures the top processes. Both of these create the output file in the currentdirectory called: Â Â Â Â_date_time.nmon

    This file is in a comma-separated values (CSV) 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 thenmon analyser.) On AIX, follow this example: Â Â Â Âsort -A mymachine_311201_1030.nmon > xxx.csv

    Notes to save you time:

    To load the nmon data capture file into a spreadsheet, check the spreadsheet documentation for loading

    CSV data files (.csv). Many spreadsheets accept this data as just one of the possible files to load or provide an import function to do this. Many spreadsheets have a fixed number of columns and rows. Isuggest you collect a maximum of 300 snapshots to avoid hitting these issues.

    When you are capturing data to a file,nmon disconnects from the shell to ensure that it continuesrunning, even if you log out. This means thatnmon can appear to crash, even though it's still running inthe background. To see if the process is still running, type:ps ?ef | grep nmon

    Read the README file for more information about which version ofnmon to run on your particular operating system.

    nmon Version 10 for AIX 5 no longer uses /dev/kmem , but only public APIs. So, you don't have to chagethe permissions on /dev/kmem, and there is no need to have 32- and 64-bit versions ofnmon .

    For AIX 5.1, 5.2, and 5.3, usenmon 10.

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    7/19

    On AIX, don't reportlslpp -Lcq bos.?p core dumps on AIX 5.1, about ML03 onwards. Also, WLMstats go missing after upgrading to AIX 5.2 ML5 to Nigel Griffiths, as these are AIX bugs. These areavoided by usingnmon Version 10.

    Don't use Microsoft® Windows® Telnet and use a larger window than 80 x 25 characters. Many

    developers use VNC and PuTTY to displaynmon from a Windows machine -- why not do the same!

    New features for nmon on AIX Version 10

    NewFeatures

    Description

    Starting up There is also now a small shell script called"nmon" that starts the rightnmon version.Place this script and nmon binaries in your $PATH and type:nmon . This version isnow only compiled in 32-bit mode. So, it runs on 32- and 64-bit hardware. The idea isto make it easier to install and run.

    N = NFS NFS is completely new fornmon 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 ashared CPU environment.

    S =Subclass

    This is for WLM subclasses -- by request.

    a = Diskadapters

    Gives you details of the disk adapter -- like their full type.

    r = This includes your CPU speed in MHz.

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    8/19

    Resources

    k = Kernel Gives some new fields.

    L = Largepages

    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) andprocesses, and active virtual memory.

    -B This is a start-up option to remove the boxes.

    Sample output for nmon 10 for AIX 5Figure 1 below is a sample of the screen output. It shows the opening screen for AIX 5, with lots of usefulinformation.

    Figure 1. Sample output for nmon 10 for AIX 5

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    9/19

    Figure 2 illustrates the details for CPU (this is a 4 CPU POWER5 machine with SMT switched on),memory use, kernel internal statistics, and disks statistics. Note: This logical partition (LPAR) is using sixtimes its entitlement in half a CPU.

    Figure 2. CPU details

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    10/19

    Figure 3 shows the details of the network, NFS statistics, and journal filesystem use.

    Figure 3. Network details

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    11/19

    The details of the POWER5 shared processor micro-partitions statistics are shown inFigure 4 below.

    Figure 4. LPAR details

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    12/19

    Figure 5 illustrates the details of the Linux version ofnmon , showing the CPU (this is a 2 CPU POWER5

    machine with SMT switched on), LPAR statistics, memory use, network statistics, file system use, and

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    13/19

    disks statistics. Note: The physical CPU of this LPAR is only available with SUSE SLES9 Service Pack 1and Red Hat EL 4 Update 1.

    Figure 5. Linux version of nmon

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    14/19

    Figure 6 shows the OS details of the machine, disk statistics (detailed mode), and the top processes.

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    15/19

    Figure 6. Linux version of nmon continued

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    16/19

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    17/19

    ResourcesLearn

    "nmon analyser -- A free tool to produce AIX performance reports"(developerWorks, April 2006): Produce a wealth of report-ready graphs fromnmon output.

    Check out the following IBM Redbooks for additional information onperformance:

    Understanding IBM pSeries Performance and Sizing, SG24-4810-01,Febraruary 2001

    Database Performance on AIX in the DB2 UDB and Oracle Environments,SG24-5511, January 2003

    AIX 5L Performance Tools Handbook,SG24-6039, August 2003

    Check out other articles and tutorials written by Nigel Griffiths: AIX and UNIX zone

    Across IBM and developerWorks

    " AIX 5 performance series: CPU monitoring and tuning": Browse through this

    Dig deeper into AIX and Unix ondeveloperWorks

    Overview

    New to AIX and UnixTechnical library (tutorials and more)

    Forums

    Community

    Downloads and products

    Open source projects

    Events

    Bluemix DevelopersCommunityGet samples, articles, productdocs, and community resources tohelp build, deploy, and manageyour cloud apps.

    developerWorks Weekly

    Newsletter Keep up with the best and latest

    Obtaining the toolThe following download options are available:

    You can download nmon and its tools from IBM Wiki athttp://www-941.haw.ibm.com/collaboration/wiki/display/WikiPtype/nmon.

    Check out the Performance Tools forum for nmon questions and ideas athttp://www-03.ibm.com/systems/p/community/.

    http://www.ibm.com/developerworks/aix/find/events/http://www.ibm.com/developerworks/aix/community/http://www.ibm.com/developerworks/aix/find/downloads/http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/SG244810.htmlhttp://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/SG246039.htmlhttp://www.ibm.com/developerworks/aix/library/au-nmon_analyser/http://www.ibm.com/developerworks/aix/http://ibmdeveloperworks.mkt6741.com/dWdWWeeklyNewsletterSubscriptionPage/http://www.ibm.com/developerworks/aix/newto/http://www.ibm.com/developerworks/search/searchResults.jsp?searchType=1&searchSite=dW&searchScope=dW&query=Nigel+Griffiths&Search.x=44&Search.y=10https://www.ibm.com/developerworks/community/forums/html/category?id=33333333-0000-0000-0000-000000000072https://www.ibmdw.net/bluemix/http://www.ibm.com/developerworks/views/aix/libraryview.jsp?search_by=nigel+griffithshttp://www.ibm.com/developerworks/aix/find/projects/http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/SG245511.htmlhttp://www.ibm.com/developerworks/aix/library/au-aix5_cpu/index.htmlhttp://www-03.ibm.com/systems/p/community/http://www-941.haw.ibm.com/collaboration/wiki/display/WikiPtype/nmonhttp://www.ibm.com/developerworks/aix/library/

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    18/19

    article to get rid of your CPU bottlenecks and improve performance.

    Search the AIX and UNIX library by topic:System administration

    Application development

    PerformancePorting

    Security

    Tips

    Tools and utilities

    Java™ technology

    LinuxOpen source

    AIX and UNIX: The AIX and UNIX developerWorks zone provides a wealth of information relating to all aspects of AIX systems administration andexpanding your UNIX skills.

    New to AIX and UNIX: Visit the New to AIX and UNIX page to learn more

    about AIX and UNIX. AIX 5L™ Wiki: A collaborative environment for technical information related to AIX.

    IBM Power Systems on IBM PartnerWorld

    Safari bookstore: Visit this e-reference library to find specific technicalresources.

    developerWorks technical events and webcasts: Stay current with

    technical info to help you tackleyour development challenges.

    DevOps ServicesSoftware development in the cloud.Register today to create a project.

    IBM evaluation softwareEvaluate IBM software andsolutions, and transformchallenges into opportunities.

    http://www.ibm.com/developerworks/apps/SendTo?aix=aixtipshttp://safari5.bvdep.com/http://www.ibm.com/developerworks/apps/SendTo?aix=aixsecurityhttp://www.ibm.com/partnerworld/systems/powerhttp://www.ibm.com/developerworks/apps/SendTo?aix=aixnewtohttp://www.ibm.com/developerworks/apps/SendTo?aix=aixportinghttp://www.ibm.com/developerworks/downloads/?ca=dti-tiles-evaluatehttp://www.ibm.com/developerworks/apps/SendTo?aix=aixtoolsandutilitieshttp://www.ibm.com/developerworks/apps/SendTo?aix=aixperformhttp://www.ibm.com/developerworks/apps/SendTo?aix=aixsystemadminhttp://www.ibm.com/developerworks/apps/SendTo?aix=aix5lwikihttps://hub.jazz.net/?utm_source=dw&utm_campaign=bluemix&utm_content=au-analyze_aix&utm_medium=articlehttp://www.ibm.com/developerworks/apps/SendTo?aix=aixopensourcehttp://www.ibm.com/developerworks/apps/SendTo?community=aixdwtecheventsarthttp://www.ibm.com/developerworks/apps/SendTo?aix=aixappdevhttp://www.ibm.com/developerworks/apps/SendTo?aix=aixzonehttp://www.ibm.com/developerworks/apps/SendTo?aix=aixlinuxhttp://www.ibm.com/developerworks/apps/SendTo?aix=aixjava

  • 8/16/2019 Nmon Performance_ a Free Tool to Analyze AIX and Linux Performance

    19/19