ubuntu13.4 performance monitoring and analysis tools--nmon

Source: Internet
Author: User
Tags memory usage resource cpu usage

Nmon is a monitoring and analysis tool widely used on AIX and various Linux operating systems, and the information recorded by Nmon is more comprehensive, it can capture the usage of system resources in real time while the system is running, and can output the results to the file. The Nmon tool helps to display all of the important performance optimization information on one screen and dynamically updates it. Also, Nmon runs without excessive system resources, typically with no more than 2% CPU usage. On the updated computer, its CPU utilization will be less than 1%.

For different operating system versions, Nmon has a corresponding version of the program, it is important to note that the file needs to perform an authorized operation to operate properly. Official website Download Address: http://nmon.sourceforge.net/pmwiki.php

The 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

In the actual work, Nmon has three kinds of commonly used modes, namely real-time monitoring, background monitoring and regular monitoring mode. The following are described separately

1, real-time monitoring : After the completion of the configuration, only the "#./nmon" command to run the program, through a number of shortcut keys to the system resource indicators to display, such as the key "C" can view the CPU information; Press "D" to view the disk information; Press "T" Can view the process information of the system, "M" corresponding to the memory, "N" corresponding to the network, etc., the complete shortcut key content can be viewed through the Help (key "H"), can display the Linux system CPU, memory, process information, including the CPU user, system, wait and idle status values, available memory, Detailed metrics such as cache size and CPU consumption of the process. This kind of way displays the information real-time strong, can grasp in time the system under the pressure the operation situation, each CPU utilization is how much, the memory uses, the network traffic how much, the disk reads and writes ... This data is refreshed in real time, at a glance. But if we want to keep a record of the resource situation for a while for subsequent analysis, we need to use Nmon in another way.

2, background monitoring : In order to match the performance test, we often need to be a time period of system resource consumption recorded, then you can use the command:./nmon-f-S 10-c. Description

Ø-f: Output file name by standard format:

Ø-s: Sample Every n seconds, here is 10 seconds

Ø-c: The number of samples taken out, here is 360, that is, monitoring =10*360/3600=1 hours after the command starts, it will generate a monitoring file in the Nmon directory, and continue to write the resource data, until 360 monitoring points collected to complete-that is, monitoring 1 hours, these operations are automatically completed, Without manual intervention, testers can continue to do other things. If you want to stop the monitoring, you need to query the process number through "#ps –ef|grep Nmon" and then kill the process to stop monitoring.

3. Regular monitoring: In addition to the short-term monitoring of performance testing, we can also achieve regular monitoring of the system as a reference in the operational maintenance phase. Regular monitoring can be achieved through the "#crontab-e" command, adding "0 8 * * 1,2,3,4,5/nmon-f-s 30-c 1200" on the last line, indicating: from Monday to Friday, the monitoring is 10 hours (until 18:00) from 08 o'clock in the morning.

[Root@localhost ~]#./nmon_14i_x86_ubuntu134


Check the corresponding parameters to enter the appropriate letter, such as viewing the CPU, input C can

Use Q to exit

[Root@localhost ~]#/nmon_14i_x86_ubuntu134-f-S 10-C 360//Background monitoring

[root@localhost ~]# LS//view build monitoring file

Localhost_120427_0922.nmon

[Root@localhost

Convert the. nmon file to a. csv file by using the following command to generate the corresponding. csv file in the current directory.

[root@localhost ~]# sort Localhost_120427_0922.nmon > Localhost_120427_0922.csv

Convert the resulting CSV file into Excel and download the conversion tool Nmon Analyser tool (Nmon Analyserv33g.xls). Download Address Www.ibm.com/developerworks/wikis/display/Wikiptype/nmonanalyser, open nmon analyserv33g.xls after download

[Img]http://my.csdn.net/uploads/201206/13/1339571464_9492.png[/img]

Click Analyse nmon data to select the generated CSV file, then convert to. excel file, generate a graphical file, convenient data analysis, the following section of the screenshot example:





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.