1. 下载安装
下载地址:
http://jmeter-plugins.org/downloads/all/ 这里我只下载了ServerAgent-2.2.1.zip和JMeterPlugins-Standard-1.1.2.zip
JMeterPlugins-Standard-1.1.2.zip 下载后放在jmeter客户端机器上解压,将其中的JMeterPlugins-Standard.jar 拷贝到jmeter 安装的lib/ext 目录下
再进入jmeter的bin目录下,修改user.properties文件,添加以下内容
完成以上操作后,打开jmeter界面,如图:# JMeter Plugins config (jmeter-plugins.org)#---------------------------------------------------------------------------# Enable or disable the gradient paint for graphs. Value is true or false, default is true.jmeterPlugin.drawGradient=true# Globaly disable final zeroing lines in all graphs. Value is true or false, default is false.jmeterPlugin.neverDrawFinalZeroingLines=true# Globaly disable current X lines drawing in all concerned graphs. Value is true or false, default is false.jmeterPlugin.neverDrawCurrentX=true# Enable or disable graphs Y Axis scaling for better readability. Value is true or false, default is true.jmeterPlugin.optimizeYAxis=true# Use relative time in time based graphs. Value is true or false, default is true.jmeterPlugin.useRelativeTime=true# Force csv separator character. Default is ',' if decimal separator is '.', ';' otherwise#jmeterPlugin.csvSeparator=;# Force csv time format (see http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html)#jmeterPlugin.csvTimeFormat=HH:mm:ss# Prefix or not plugin items in JMeter menus. Value is true or false, default is true.jmeterPlugin.prefixPlugins=true# Force line width for all line graphs. Default is '1.0'.jmeterPlugin.graphLineWidth=3# Draw markers in relevent line graphs. Default is true.meterPlugin.drawLineMarker=false
可以看到插件几乎在jmeter原有组件的基础上增加了很多增强元件,凡是以jp@gc开头都是
=============================================================================================
ServerAgent-2.2.1.zip 下载完成后,放在我们要进行压力测试的服务器上,完成解压即可
2. 简单使用插件
添加插件新增的元件jp@gc - PerfMon Metrics Collector和jp@gc - Hits per Second,这两均在监听器下面
对于jp@gc - PerfMon Metrics Collector 进行简单配置
点击Add Row添加要监控服务器的各项指标,端口默认就是4444,Metric to collector 鼠标点击后会有一个下拉框如图,根据需求自行选择即可
完成后,在服务器上进入ServerAgent-2.2.1.zip的解压目录,启动startAgent.bat(windows)或者startAgent.sh(linux),注意这里要使用admin或者root权限,正常启动后,运行jmeter,两个统计图结果:
简单介绍完毕,详情请参阅帮助文档,哈哈,直接点上图的Help on this plugin就可以