Nmon monitoring Linux Server system resources

Source: Internet
Author: User
Tags disk usage

This article transferred from: http://www.cnblogs.com/hyzhou/archive/2011/12/29/2305860.html

In the actual testing process, LoadRunner monitoring Linux system resources are not very stable, often disconnected, so the following tools are generally used to monitor.

: http://download.csdn.net/detail/hyzhou1121/3980069

Nmon Tools

The Nmon tool is a free IBM-provided tool for monitoring AIX system and Linux system resources. This tool collects the server's system resource consumption and outputs a specific file, and can use the Excel analysis tool to perform statistical analysis of the data, which is very advantageous to the performance data analysis of UNIX or Linux system. The following steps show you how to use the tool:

Installing Nmon

First download the Nmon tool on the official IBM Web site and download it to download the corresponding version. Here we take the red hat5 as an example, the download is the Nmon_x86_12a.zip version, this version supports Redhat. Download and unzip, rename to Nmon and upload to Linux.

Enter the Nmon directory to view the permissions for each file under the Nmon file.

[Email protected] nmon]# ls-l
Total 1212
-rw-r--r--1 Hyzhou Hyzhou 167781 Feb nmon_x86_fedora10
-rw-r--r--1 Hyzhou Hyzhou 168875 Feb nmon_x86_opensuse10
-rw-r--r--1 Hyzhou Hyzhou 152131 Feb nmon_x86_rhel45
-rw-r--r--1 Hyzhou Hyzhou 167957 Feb nmon_x86_rhel52
-rw-r--r--1 Hyzhou Hyzhou 174171 Feb NMON_X86_SLES10
-rw-r--r--1 Hyzhou Hyzhou 154107 Feb nmon_x86_sles9
-rw-r--r--1 Hyzhou Hyzhou 183215 Feb nmon_x86_ubuntu810

It can be seen that the permissions of the relevant files only have read-only permissions, so that there may be no permissions when executing the command, in order to use the Nmon tool normally, we need to modify the permissions of the file. Here only modify the permissions of the nmon_x86_rhel52, for convenience, directly changed to 777.

#chmod u+x nmon_x86_rhel52

After the modification is complete, the Nmon tool installation is completed.

Using the Nmon tool

The Nmon tool is very simple to use. Start the tool first and enter it in the Nmon directory

#./nmon_x86_rhel52

, the display effect after startup (shows the relevant help information):

A single letter for the corresponding monitoring point of the shortcut keys, as long as the corresponding letter input, you can display the corresponding resource consumption, input C, M, d after the display of the following (showing the CPU, memory, disk usage):

Output file

As described above only in server monitoring, what we really need is how to collect this data and handle the analysis of them. Nmon provides a Nmon_analyser analysis tool that can be used to analyze statistical results using Excel. When testing, you can use the following command to output the data:

#./nmon_x86_rhel52-ft-s 5-c 5

The meaning of the command is that the-F output file,-t outputs the most voluntary process,-s collects data at the time interval,-C collects the number of times. For example, the test scenario takes 20 minutes to execute, so you need to monitor the Linux system resources every 10 seconds to write:

#./nmon_x86_rhel52-ft-s 10-c 120

When finished, a. nmon file is generated in the current directory, as follows:

Localhost_111228_1919.nmon

The Nmon output file is named by the server name _ DateTime. Nmon, we can extract the files from the current directory after the test.

If you want to run Nmon in the background, you can:

#nohup./nmon_x86_rhel52-ft-s 10-c 120

command to start the related process in the background run the Nmon tool.

If you want to end the process, you can use:

#ps-eaf|grep *nmon*

command to isolate the process ID and then use:

#kill-9 Process ID

command to kill the process.

Profiling data (different versions may cause errors in open files)

Once you have collected data about your system resources using the Nmon tool, you can use the Nmon tool's companion software Nmon analyser V33g.xls (tools may vary depending on the version) for data analysis. This tool is very simple to use and only need to open the appropriate. nmon file for analysis.

Open Nmon Analysis V33g.xls,

If you report a high security level error, you need to modify the macro's security level setting.

Click the Analyse Nmon Data button to select the Nmon file you want to analyze (you need to save the Execl file in the process and enter an easily distinguished filename).

The saved Excel file

Listed the system part of the resource information, in the actual process can be increased or decreased according to the needs of Nmon, the use of the introduction is finished.

Nmon monitoring Linux Server system resources

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.