1. Overview
Monitoring, is an integral part of checking system problems or optimizing system performance. Monitoring the usage of operating system resources through the operating system monitoring tool, which indirectly reflects the operation of each server program. Based on the analysis of running results, we can quickly locate the system problem range or performance bottleneck point. Nmon is a kind of monitoring and analysis tool widely used in Aix and various Linux operating systems, compared with some other system resource monitoring tools, the information recorded by Nmon is quite comprehensive, it can capture the usage of system resources in real time while the system is running, and can output the result to the file. Data files and graphical results are then generated through the Nmon_analyzer tool.
The data recorded by Nmon contains some of the following aspects (also the resource points that we are concerned about in the process of looking for problems):
Basic functions of I.nmon
The IBM Performance Monitoring Tool Nmon tool provides AIX and Linux with the ability to monitor and analyze performance data, including data that can be collected:
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
Ii. Introduction to basic functions of NMON Analyser
Quickly read the performance monitoring data generated by the Nmon and generate reports of CPU, memory, network, IO-related performance data, and the ability to generate a graph of resource usage for each process.
Calculation of weighted average value of hot spot analysis
The distribution of CPU usage expressed by the ratio of processor to collection interval, which helps to identify single-threaded processes
Additional parts of the IBM totalstorage®enterprise Storage Server (ESS) vpaths show the busy state of the device, read transfer size, and write transfer size for every time of day
The total system data rate for each session of the day and adjusts it to eliminate repetitive calculations for EMC hdiskpower devices that help identify bottlenecks in the I/O subsystem and SAN (storage area Network)
EMC Corporation (EMC) Hdiskpower and ESS DS8000 (formerly FAStT) DAC devices stand-alone worksheets
Analyze memory usage to show differences between computational and non-computational pages
Total data rate per day for each network adapter
Displays the TOP portion of the average CPU and memory usage for each command summary data
2. Download and install
I, download
Http://www.ibm.com/developerworks/wikis/display/WikiPtype/nmon+Manual
Instructions for use of the Nmon tool. pdf
Https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Power+Systems/page/nmon_analyser
Tool for analyzing the results, this tool is an Excel file named: Nmon analyser V33a.xls
Https://sourceforge.net/projects/nmon/files/nmon16d_x86.tar.gz/download
Nmon_analyser
II. Installation
1, upload to the server;
2, TAR-XZVF nmon16d_x86.tar.gz decompression installation package;
Tips: It's a good idea to create a folder that extracts the files you need to unzip into the folder.
3. Preliminary use
I, operating interface
1, run./NMON_X86_64_CENTOS6 can enter the following operating interface:
2, press C is to view CPU usage, get as shown:
3, and so on, type "M" To view system memory usage; Type "D" To view system disk I/O, type "h" to view help information, etc.
II. BACKGROUND commands
./nmon/nmon_x86_rhel5-f-n-m/nmon/log-s 30-c 120
Nmon-f-S 30-c 120
Capture 120 performance data in 30 seconds at a time.
-T output Process performance metrics
The parameter means:
-F output file;
-T outputs the most resource-intensive process;
-S collects the time interval, in seconds;
-C collection times.
The above command will be the most resource-intensive process of the system for nearly 25 seconds of resource consumption, collected every 5s, a total of 5 times, output to the current directory of the. nmon file. After this command input, the collection work will be executed in the background, so the file will continue to grow, do not copy the files for analysis before the collection work is completed, and the PS command can be used to see the nmon process. Using SSH or other FTP tools to copy the generated Nmon file, and then use the Downloaded Nmon Analyser tool to open, you can convert to Excel file, you can open the Nmon analyser There will be macro security prompts, set to allow.
Then get as follows:
Generates Localhost_120309_1610.nmon similar files.
Detailed manual:
Http://www.ibm.com/developerworks/wikis/display/WikiPtype/nmon+Manual
Open Nmon Analyser V33g.xls read the log and analyze it to get the chart.
NMON Analyser Use reference:
Http://www.ibm.com/developerworks/wikis/display/Wikiptype/nmonanalyser inside the manual.
Other:
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
Nmon Performance Statistics tool use-Beginner's knowledge