Linux性能监控与分析工具


Linux性能监控与分析工具
 
背景
最近需要对一套预研完成的系统性能测试,该系统部署在Linux服务器集群上。
在高并发、高负载场景下收集每台设备资源占用的全部信息(这些信息包括CPU,内存,I/O,磁盘,网络流量等等等),进一步分析系统瓶颈。
这里用上了nmon这款工具。由nmon负责定期收集全套系统信息,再由nmon_analyser将原始数据转换为可视化的表格与图形。
 
正文
 
Wiki:
nmon (short for Nigel's Monitor) is a popular system monitor tool for the AIX and Linux operating systems.
The original nmon was a freely downloadable tool for AIX 4.3 from the AIX wiki. It was also rewritten for the Linux operating system running on IA-32, x86-64, RS/6000 and Power processor and Mainframe and released by IBM to open source in July 2009.
nmon download
Here  —— 选择自己系统对应的nmon版本下载
nmon_analyser download:
Here
 
使用方式
在待监控设备Linux系统中执行:
[plain] 
# ./nmon -h  
可以查询参数列表,也可直接执行nmon看到即时的界面(形如top)
例如:
[plain] 
# ./nmon -f -t -s 15 -c 480  
 
-f :按标准格式输出<hostname>_YYYYMMDD_HHMM.nmon,这个文件就是nmon_analyser的输入;
-s:数据采集周期,这里是每15s一次;
-c:采集总次数,这里共采集480次;
这里持续采集15*480 = 7200s(2个小时);
-m:可以指定文件生成路径;
 
其他
1、配合crontab可以实现对系统的定时监控,例如每晚20:00启动,23:00采集结束;
2、使用nmon_analyser将nmon文件转换为Excel格式便可直接浏览(nmon文件实质是以逗号分隔的文件,csv)
3、生成的报告中wAvg指的是非零数据的平均值
 
来源  blog:http://blog.csdn.net/pirateleo
 

相关内容

    暂无相关文章