写在前面的话, 做者认为jmeter的监控被测服务器资源只是基本可用, 还好习惯了linux的各类命令和工具,因此也基本不用担忧什么了.可是有了图形化的监控, 也方便给领导出报告. 怎么说也是不错的. linux
在准备正式开始性能测试时,发现,原有的服务器端性能监控的方案,没法经过非GUI模式保存性能数据,并且所记录性能数据比较单一,只有内存的使用状况;因此尝试其余方法;web
找到的方法服务器
http://jmeter-plugins.org/wiki/PerfMonAgent/?utm_source=jpgc&;utm_medium=link&utm_campaign=PerfMonAgenttcp
是jmeter官方发布的一个专门做用作web服务器性能监控的工具,包括两部分,须要下载工具
JMeterPlugins-Standard-1.1.1.zip,性能
安装到Jmeter以后就会多一个监视器测试
其次须要下载 ServerAgent-2.2.1.zipthis
这个是服务器代理,在须要监控的服务器上运行用来采集并向测试机发送服务器信息;spa
使用方法3d
$ ./startAgent.sh --udp-port 0 --tcp-port 3450 INFO 2011-11-25 19:02:14.315 [kg.apc.p] (): Binding TCP to 3450
下面是官网的简介 jmeter很好很强大呀
Servers Performance Monitoringsince 0.3.0
Introduction
During a load test, it is important to know the health of the servers loaded. It is also nice to see if you are targeting a cluster if the load is correctly dispatched. To address this, the plugin package now supports server monitoring! Using it, you can monitor CPU, Memory, Swap, Disks I/O and Networks I/O on almost all platforms!
Here is how the plugin looks like. It shows the CPU usage of 4 servers involved in the load test:
Metrics collected
Since version 0.5.0 the Server Agent tool supports collecting over 75 system metrics. See full list.
How it worksConcept
JMeter cannot retrieve by default server metrics except Tomcat ones. To overcome this situation, we have developed a server agent which will get performance data for JMeter. The agent uses the SIGAR open source library. It is composed of a Java common part and native libraries per OS.
Installation
Server Agent tool detailed description is placed here.
UsageGUI Mode
In GUI mode, just add the listener, define servers and metric types to monitor, ensure the agent is running at remote server and is not blocked by a firewall, then run the test. The values will be displayed at real time chart.
Non GUI Mode
If you run JMeter in non GUI mode and want to save monitoring data to file, just configure result file saving in GUI as you do with other listeners. After running the test you may load saved file into GUI and see the values timeline.