linux下nmon的安装及使用

1.下载nmon压缩包:

http://nmon.sourceforge.net/pmwiki.php?n=Site.Download

根据系统的发型版本及CPU位数选择相应的压缩包下载,如系统发行版本为:7.4

[[email protected] ~]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 7.4 (Maipo)

[[email protected] ~]# uname -a

Linux node1 3.10.0-693.el7.x86_64 #1 SMP Thu Jul 6 19:56:57 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux

 

linux下nmon的安装及使用

2.下载到系统中

[[email protected] highgo]# ll nmon16g_x86.tar.gz

-rw-------. 1 highgo highgo 692079 Feb 12 11:04 nmon16g_x86.tar.gz

3.解压

[[email protected] highgo]# tar -xvf nmon16g_x86.tar.gz

nmon16g_x86_fedora25

nmon16g_x86_rhel72

nmon16g_x86_sles114

nmon16g_x86_sles12

nmon16g_x86_ubuntu1604

4.将nmon16g_x86_rhel72复制到环境变量的路径下

[[email protected] bin]# mkdir /usr/local/bin/nmon

[[email protected] nmon]# cp nmon16g_x86_rhel72 /usr/local/bin/nmon/

[[email protected] nmon]# ll

total 400

-rwxrwxrwx. 1 root root 406334 Feb 12 11:12 nmon16g_x86_rhel72

4.启动nmon

[[email protected] nmon]# ./nmon16g_x86_rhel72

 

linux下nmon的安装及使用

5.采集系统性能信息,并生成报告

执行./nmon -s3 -c60 -f -m ./report,-s3为每3s收集一次性能信息,-c60为收集60次,-f为生成的文件名包含该文件创建时间,-m ./report为指定测试报告存储路径

[[email protected] nmon]# ./nmon16g_x86_rhel72 -s3 -c60 -f -m /opt/report

[[email protected] nmon]# cd /opt/report/

[[email protected] report]# ll

total 36

-rw-r--r--. 1 root root 33733 Feb 12 11:33 node1_200212_1133.nmon