1、下载安装
wget ftp://10.249.100.249/pub/nmon/nmon16d_x86.tar.gz
tar -zxvf nmon16d_x86.tar.gzchmod +x nmon_x86_64_centos6
mv nmon_x86_64_centos6 /usr/local/bin/nmon
cd/usr/local/bin/nmon/
./nmon
nmonq16dqqqqqq[H for help]qqqHostname=ewmadgqqqqqqqRefresh= 2secs qqq10:17.45qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x x
x ------------------------------ x
x _ __ _ __ ___ ___ _ __ For help type H or ... x
x | '_ \| '_ ` _ \ / _ \| '_ \ nmon -? - hint x
x | | | | | | | | | (_) | | | | nmon -h - full details x
x |_| |_|_| |_| |_|\___/|_| |_| x
x To stop nmon type q to Quit x
x ------------------------------ x
x x
x LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-n ng-4.0-noarch x
x GenuineIntel Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz x
x MHz=1200.000 bogomips=5202.44 x
x ProcessorChips=1 PhyscalCores=10 x
x Hyperthreads =2 VirtualCPUs =40 x
x x
x Use these keys to toggle statistics on/off: x
x c = CPU l = CPU Long-term - = Faster screen updates x
x m = Memory V = Virtual memory + = Slower screen updates x
x d = Disks n = Network j = File Systems x
x r = Resource N = NFS . = only busy disks/procs x
x k = Kernel t = Top-processes h = more options x
x q = Quit x
xqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqx
按照上面的提示操作,c--cpu m-memory d-disk 其他依次可以进行分析。
mkdir /nmon_jk
crontab -e
0 12 * * 1 /usr/local/bin/nmon -f -m /home/nmon_jk -s300 -c864 >/dev/null 2>&1
0 12 * * 3 /usr/local/bin/nmon -f -m /home/nmon_jk -s300 -c864 >/dev/null 2>&1
0 12 * * 5 /usr/local/bin/nmon -f -m /home/nmon_jk -s300 -c864 >/dev/null 2>&1
参数解释:
-s10每10秒采集一次数据。
-c60采集60次,即为采集十分钟的数据。
-f生成的数据文件名中包含文件创建的时间。
-m生成的数据文件的存放目录。
这样就会生成一个nmon文件,并每十秒更新一次,直到十分钟后。
如图: