1.簡(jiǎn)介
The nmon tool is designed for AIX and Linux performance specialists to use for monitoring and analyzing performance data, including:
* CPU utilization
* Memory use
* Kernel statistics and run queue information
* Disks I/O rates, transfers, and read/write ratios
* Free space on file systems
* Disk adapters
* Network I/O rates, transfers, and read/write ratios
* Paging space and paging rates
* CPU and AIX specification
* Top processors
* IBM HTTP Web cache
* User-defined disk groups
* Machine details and resources
* Asynchronous I/O — AIX only
* Workload Manager (WLM) — AIX only
* IBM TotalStorage? Enterprise Storage Server? (ESS) disks — AIX only
* Network File System (NFS)
* Dynamic LPAR (DLPAR) changes — only pSeries p5 and OpenPower for either AIX or Linux
2. 安裝
Ubuntu下可以用 apt-get -y install nmon安裝就好。
3. 采集數(shù)據(jù)并生成報(bào)表
1)采集數(shù)據(jù),使用命令:
nmon -s 10 -c 60 -f -m /home/
參數(shù)解釋:
-s 10 每 10 秒采集一次數(shù)據(jù)。
-c 60 采集 60 次,即為采集十分鐘的數(shù)據(jù)。
-f 生成的數(shù)據(jù)文件名中包含文件創(chuàng)建的時(shí)間。
-m 生成的數(shù)據(jù)文件的存放目錄。
這樣就會(huì)生成一個(gè) nmon 文件,并每十秒更新一次,直到十分鐘后。
生成的文件名如: hostname_090824_1306.nmon ,"hostname" 是這臺(tái)主機(jī)的主機(jī)名。
2)生成報(bào)表:
下載 nmon analyser (生成性能報(bào)告的免費(fèi)工具):
http://www.ibm.com/developerworks/wikis/display/Wikiptype/nmonanalyser
把之前生成的 nmon 數(shù)據(jù)文件傳到 Windows 機(jī)器上,用 Excel 打開分析工具 nmon analyser v33C.xls 。點(diǎn)擊 Excel 文件中的 "Analyze nmon data" 按鈕,選擇 nmon 數(shù)據(jù)文件,這樣就會(huì)生成一個(gè)分析后的結(jié)果文件: hostname_090824_1306.nmon.xls ,用 Excel 打開生成的文件就可以看到結(jié)果了。
如果宏不能運(yùn)行,需要做以下操作:
工具 -> 宏 -> 安全性 -> 中,然后再打開文件并允許運(yùn)行宏。
自動(dòng)按天采集數(shù)據(jù):
在 crontab 中增加一條記錄:
0 0 * * * root nmon -s300 -c288 -f -m /home/ > /dev/null 2>&1
300*288=86400 秒,正好是一天的數(shù)據(jù)。
聯(lián)系客服