NMON

2018年6月8日 708点热度 0人点赞 0条评论

■■NMON
nmon is a computer performance system monitor tool for the AIX and Linux operating systems. The tool displays on-screen or saves to a data file the operating system statistics to aid the understanding of computer resource use, tuning options and bottlenecks.
翻译:nmon是一个AIX和Linux主机性能监视工具。它可以将操作系统的统计数据显示在屏幕上或保存到数据文件里,目的是了解主机的资源使用情况、调试功能、瓶颈。

■下载、编译、安装
http://nmon.sourceforge.net

1、Download the latest source code (it is just one file names lmon<version>.c) and the makefile
2、Install the GCC C Compiler, ncurses development library and (if its not already available) Install the make command
yum install gcc*
yum install ncurses-dev*
yum install make

3、Hard link the latest C source code file to the filename lmon.c (lmon.c is used in the makefile)
ln lmon99z.c lmon.c

4、Edit the makefile to find your platform, OS and version in the makefile or make a new one
Run make and you have a new version in roughly 4 seconds. Ready to run.
make nmon_x86_rhel6
cp nmon_x86_rhel6 /usr/bin/nmon

■运行nmon
执行nmon即进入监控界面
如果在linux下显示乱码,需要指定终端类型
export TERM=xterm

■采集数据
nmon -s10 -c60 -f -m /opt/ &
参数解释:
-s10 每 10 秒采集1次
-c60 采集 60 次,即采集10分钟
-f 生成的数据文件名中包含文件创建的时间
-m 生成的数据文件的存放目录
这样就会生成一个 nmon 文件,并每10秒更新1次,直到10分钟后。

■自动按天采集数据
在 crontab 中增加一条记录:
#自动采集主机系统性能统计信息,300秒采集1次,采集288次即1天,1天生成1个数据文件
0 0 * * * nmon -s300 -c288 -f -m /var/log/nmon > /dev/null 2>&1

■■NMON分析工具
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Power%20Systems/page/nmon_analyser
最新版本如下:
filename: "nmon analyser v52_1.xlsm"

在里面打开nmon的数据文件,可以自动生成各种统计图表。

liking

这个人很懒,什么都没留下

文章评论