Nmon Performance Monitoring Tool Summary

Source: Internet
Author: User

I. Introduction to Nmon Tools

Nmon is a free tool for analyzing AIX and Linux performance (primarily IBM developed for its own AIX operating system, but it can also be used on Linux operating systems), while Nmon_ Analyser is a tool for Nmon to convert Nmon generated reports into Excel reports for viewing

The Nmon tool can display all important performance optimization information on one screen and dynamically update it. It doesn't consume a lot of CPU, usually less than 2%

Http://nmon.sourceforge.net/pmwiki.php?n=Site.Download

Http://sourceforge.net/projects/nmon/files/?source=navbar

Note Select the version that corresponds to your machine:

Linux View system version number:

1. Method 1

For Linux systems, there are hundreds of distributions. For release version number View method

Take CentOS for example. Input lsb_release-a can be

This command applies to all Linux, including Redhat, SuSE, Debian, and other distributions

2.

3.

View the number of system bits

Also for Linux systems there are 32 and 64 bits, using the above view kernel method, enter

Uname-a or More/proc/version

There's a x86_64 behind the kernel version that means 64 is the system.

# uname-a
X86_64 indicates that you are a 64-bit kernel, running a 64-bit system.
i386, i686 you're a 32-bit kernel, running a 32-bit system.

There are several ways to view the kernel:

1. uname-a# displays detailed kernel information ,

Linux localhost.localdomain 2.6.18-92.1.6.el5xen #1 SMP Wed June 12:56:52 EDT-x86_64 x86_64 x86_64 Gnu/linux

2. cat/etc/issue# Display version type

Scientific Linux SL Release 5.2 (boron)
Kernel \ r on an \m

3. Cat/proc/version

Linux version 2.6.18-92.1.6.el5xen ([email protected]) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-4 2)) #1 SMP Wed June 12:56:52 EDT

To view the number of operating system bits:

1.ls/ #如果有lib64或这个目录, the operating system is 64-bit
2.getconfig long_bit If output 32 is 32-bit system, 64 is 64-bit system

An int type and a long type are generally 4 bytes in a 32-bit system ,

The int type in the 64-bit system is still 4 bytes, but long has become 8 bytes.

"Getconf word_bit" and "getconf long_bit" are available in the Inux system to obtain the digits of WORD and LONG.
64-bit systems should be 32 and 64, respectively.

3. If X86 is signaled as 64-bit system in uname-a , i386 32-bit system

Two. Download and install

Nmon is only an executable file after the default download, but it is differentiated according to the different system when downloading.

You can choose the appropriate version according to your own system.

Execute the Command more/etc/issue view the system version.


Upload the downloaded nmon_x86_rhel45 file to the Linux server first

[Email protected] source]# chmod 777 Nmon_x86_rhel45

[[email protected] source]#./NMON_X86_RHEL45 (Switch to the directory where the Nmon_x86_rhel45 file is located)

[[Email protected] source]# env

[Email protected] source]# MV Nmon_x86_rhel45/usr/bin

[Email protected] source]# MV Nmon_x86_rhel45 Nmon

[[email protected] source]# Nmom (now Nmon is the global command)

Use of Nmon tool commands:

#nmon-S 300-c 288-f-m/tmp

-S 300: Indicates that data is collected every 300 seconds,

C 288: The acquisition of 288 times, 300*288=86400 seconds, just 1 days of data, so run once this program will generate a day of data files,

-m/tmp: Represents the path to the generated data file

-F: Indicates that there is time in the generated data file name

Also allows it to automatically monitor a folder every day, one file per hour, or 5 samples per minute

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.

Nmon-f-S 10-c 60

-F indicates that there is time in the generated data file name;

-S 10 means that data is collected every 10 seconds;

-C 60 means acquisition 60 times, 10*60=600 seconds,

It's just 10 minutes of data, so running this program will generate a file that collects 10 minutes of data. The line command will create an output file in the current directory named:

More usage
Crontab-e
0 0 * * */usr/local/nmo-s300-c288-f-m/home/nmon/>/dev/null 2>&1
Said:
300*288=86400 seconds, just a day's data.
0 8 * * 1,2,3,4,5/usr/local/nmon-f-n-m/home/nmon/log-s 30-c 1200
Said:
From Monday to Friday, 10 hours (until 18:00) were monitored and exported to/home/nmon/log, starting from 08 o'clock in the morning.

Example 1:

Automatically collect data by day:
Add a record to the crontab:
0 0 * * * nmon-s300-c288-f-m/home/>/dev/null 2>&1:
300*288=86400 seconds, just a day's data.

Example 2:
A, Execution command: #crontab-E
B. Add the following command on the last line:
0 8 * * 1,2,3,4,5/nmon/scriptn/mon_x86_rhel52-f-n-m/nmon/log-s 30-c 1200
Said:
From Monday to Friday, from 08 o'clock in the morning, monitoring 10 hours (until 18:00), output to/nmon/log

Third, Nmon data collection

1. Data acquisition

To monitor the system's usage over time and record the results in real time, we can do this by running the following command:

1 #./ nmon -f -t -s30 -c 180

Parameter description:

l-f< Span style= "color: #000000; line-height:150%; font-size:14px; " >: Output files in standard format:

l-t< Span style= "color: #000000; line-height:150%; font-size:14px; " >: The output includes high-occupancy processes;

l- S3030 seconds data collection

l- C180180

after entering the command enter, a hostname_timeseries.nmon files, nmon_.nmon

Special Note:

When the command is started, it isNmon Create a monitoring file in the directory and continue writing to the resource data until 3601 hours, these operations are done automatically without manual intervention, and testers can continue to do other things. If you want to stop the monitoring, you need to pass the #ps Span style= "color: #000000; line-height:150%; font-size:14px; " >–ef| Grepnmon "Query the process number and then kill the process to stop monitoring.

[Email protected] source]# hostname

Linux_test

[Email protected] source]#/nmon-f-S 10-C 60

[Email protected] source]# Ps-ef | grep Nmon

Root 17815 1 0 08:22 pts/1 00:00:00/nmon-f-S 10-C 60

Root 17888 6977 0 08:22 pts/1 00:00:00 grep nmon

[[email protected] source]# ls Linux_test_120724_0822.nmon

Linux_test_120724_0822.nmon

When we execute the relevant command, we generate a file in the current directory that starts with this hostname linux_test to execute the date as the rule, nmon the end of the document, and we see the associated Nmon process through the PS command, Here we are 10 minutes after the past we will find the relevant Nmon process will disappear.

Linux_test_120724_0822.nmon is the data file we generated, all the information is in the Linux_test_120724_0822.nmon record, and we found through the more command that we can not understand some of the text, This requires us to translate it into a file that we can read in Excel format. First we export the Linux_test_120724_0822.nmon file to our Windows Local. And then we're from Http://www.ibm.com/developerworks/wikis/display/Wikiptype/nmonanalyser.

Download Nmonanalyser software to Windows Local. After opening the unpacked file, we will find 2 files, one is Nmonanalyse description of Word format is stable and the other is Nmonanalyse file in Excel format.

All we need here is Excel format to ask the file, we double click Open.

Four. Generate graphical results

Download Nmon Analyser (free tool for generating performance reports):

https://www.ibm.com/developerworks/community/wikis/form/anonymous/api/wiki/ 61ad9cf2-c6a3-4d2c-b779-61ff0266d32a/page/b7fc61a1-eef9-4756-8028-6e687997f176/attachment/ 721e9797-b5fc-41d7-9b2f-5bd2aa2c8f7d/media/nmon_analyser_34a.zip

After decompression can get a Nmon analyser V34a.xls,

Double hit Open Nmon analyser v34a.xls;

Set the security level for Excel macros to be lowered
Select the option in the

Open excel in Nmon_analyser, and then load the Nmon data, saving the output of Excel.

Dynamic display:

Nmon Performance Monitoring Tool Summary

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.