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
inflating:nmon_x86_rhel45
inflating:nmon_x86_sles9
inflating:nmon_x86_ubuntu810
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: _090824_1306.nmon, "" is the host name of this host.
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