Use Nmon to monitor and analyze system performance under Linux

Source: Internet
Author: User
Tags cpu usage

Analysis tools

A free tool for analyzing AIX and Linux performance, the Nmon tool helps to display all of the important performance tuning information on one screen and dynamically update it. This efficient tool can work on any dumb screen, Telnet session, or even dial-up lines. In addition, it does not consume a lot of CPU cycles, usually less than 2%. On the updated computer, its CPU utilization will be less than 1%. Use a dumb screen to display the data on the screen and update it every two seconds. However, you can easily change this interval to a longer or shorter time period. If you stretch the window and display the data in x Windows, VNC, PuTTY, or similar windows, the Nmon tool can output a large amount of information at the same time. The Nmon tool can also capture the same data to a text file for later analysis and drawing of the report. The output file is in spreadsheet format (. csv).Performance IntroductionThe Nmon tool provides AIX and Linux performance experts with the ability to monitor and analyze performance data, including:
  • CPU usage
  • Memory usage
  • Kernel statistics and running queue information
  • Disk I/O speed, transmission, and read/write ratios
  • Free space in the file system
  • Disk Adapter
  • Network I/O speed, transmission, and read/write ratios
  • Page space and page speed
  • CPU and AIX specification
  • The process that consumes the most resources
  • IBM HTTP Web Cache
  • User-defined Disk groups
  • Computer details and resources
  • asynchronous I/O, only for AIX
  • Workload Manager (WLM), available only for AIX
  • IBM totalstorage®enterprise Storage Server® (ESS) disk, only available for AIX
  • Network File System (NFS)
  • Dynamic LPAR (DLPAR) changes, only available for pseries P5 and OpenPOWER for AIX or Linux
Also includes a new tool for generating graphics from Nmon output and creating. gif files that can be displayed on a Web site. Operating environment * aix® 4.1.5, 4.2.0, 4.3.2, and 4.3.3 (Nmon version 9a: The functionality of this version has been determined and will not be further developed.) * AIX 5.1, 5.2, and 5.3 (Nmon version 10: This release now supports AIX 5.3 and power5™ processor-based computers, and provides support for SMT and shared CPU micro-partitioning. ) * pseries® P5 and openpower™ on Linux™suse SLES 9, Red Hat EL 3 and 4, debian* Linux SUSE, Red Hat and many of the latest x86 (32-bit mode Intel and AMD) on the release * ZS eries® or Linux SUSE and Red Hat on the mainframe installationThe tool is a standalone binary (different AIX or Linux versions of this file), you can complete the installation of the tool in five seconds, if your input speed, perhaps less time. The installation process is simple: * Copy the Nmonxxx.tar.z file to your computer. If you use FTP, keep in mind that binary mode is used. Note: XXX in the example is replaced by the actual version. * To unzip the file, you can run Uncompress nmonxx.tar.z. * To extract the file, you can run tar xvf nmonxx.tar. * Read the Readme file. * To start the Nmon tool, enter Nmon. * If you are the root user, you may need to enter the./nmon.

One. Download Nmon.

Depending on the type of CPU you choose to download the appropriate version:
Http://nmon.sourceforge.net/pmwiki.php?n=Site.Download
wget http://sourceforge.net/projects/nmon/files/download/nmon_x86_12a.zip/download


Two. Initialize the Nmon tool.

#unzip Nmon_x86_12a.zip
Archive:nmon_x86_12a.zip
Inflating:nmon_x86_rhel45
Inflating:nmon_x86_rhel52
Inflating:nmon_x86_sles9
Inflating:nmon_x86_sles10
inflating:nmon_x86_ubuntu810
Inflating:nmon_x86_fedora10
Inflating:nmon_x86_opensuse10


Based on different platforms, initialize the Nmon tool for the corresponding platform:
chmod +x nmon_x86_ubuntu810
MV Nmon_x86_ubuntu810/usr/local/bin/nmon


For Debian also do the following (do not do the same can be run):
Apt-get Install Lsb-release
lsb_release-d | Sed ' s/description:\t//' >/etc/debian_release


Then directly run Nmon, directly run Nmon can monitor the use of system resources in real-time, perform the following steps to show a period of time system resource consumption report.

Here is the direct execution of the Nmon command to monitor the system resource consumption in real time:

CPU, memory, disk, and network consumption are all visually displayed.

Three. Generate the Nmon report.

1). Collect Data:
#nmon-s10-c60-f-m/home/

Parameter explanation:
The-S10 collects data every 10 seconds.
-c60 collected 60 times, that is, the acquisition of 10 minutes of data.
-F generates a data file name that contains the time when the file was created.
The storage directory of the data files generated by-M.

This generates a Nmon file and updates every 10 seconds until 10 minutes later.
The generated file name is:

nmon-h See more help information.

2). To generate a report:
Download Nmon Analyser (free tool for generating performance reports):
Https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Power%20Systems/page/nmon_analyser


Upload the previously generated Nmon data file to the Windows machine and open the analysis tool Nmon analyser v33c.xls with Excel. Click the "Analyze Nmon Data" button in the Excel file to select the Nmon file, which will generate a parsed result file: Hostname_090824_1306.nmon.xls, open the generated file with Excel to see the results 。

If the macro does not run, the following actions are required:
Tools, macro-and security, and then open the file and allow the macro to run.


The following is the Nmon report generated in the test environment:

The red area is the analysis report for different indicators.

3). automatically collect data by day:
Add a record to the crontab:
0 0 * * * root nmon-s300-c288-f-m/home/>/dev/null 2>&1

300*288=86400 seconds, just a day's data.


Reference Articles :

Nmon Performance: Free tools for analyzing AIX and Linux performance:
Http://www.ibm.com/developerworks/cn/aix/library/analyze_aix/index.html

Nmon analyser--free tool for generating AIX performance reports:
Http://www.ibm.com/developerworks/cn/aix/library/nmon_analyser/index.html


--end--

Use Nmon to monitor and analyze system performance under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.