The result chart generated by jmeter is not easy to see. A plug-in is always used to generate many more intuitive charts, and you can even view the running resources of the system with the server-agent.
Jmeter test data chart generation
Plugin installation
1. download the latest jmeter plug-in jmeter-plugins-standard Downloads page
2. decompress the ZIP folder to the jmeter installation directory.
3. Modify the jmeter installation path:Bin/jmeter. PropertiesThe following lines of the file:
jmeter.save.saveservice.thread_counts=true
4. Start jmeter and you will see many more options starting with [email protected ].
Get jtl files
Create a view results tree in thread groups and write the results to the jtl file. Click Configure to select the data to be analyzed.
Generate performance reports from jtl files
Jmeter-plugins can extract data from jtl to generate various types of charts. In our system, the most important thing is system latency and TPS. You can use cmdrunner to generate corresponding charts.
java -jar apache-jmeter-2.8/lib/ext/CMDRunner.jar --tool Reporter --input-jtl ./testresult.jtl --plugin-type LatenciesOverTime --generate-png report-latency.pngjava -jar apache-jmeter-2.8/lib/ext/CMDRunner.jar --tool Reporter --input-jtl ~/testresult.jtl --plugin-type TransactionsPerSecond --generate-png report-transactionPerSec.png
Server resource usage monitoring
The above is to test the server throughput at the jmeter test end. In the actual test process, we also need to observe the server resource usage. This can be achieved through serveragent. Server Agent starts a process on each server to listen to server data and provides port 4444 to external users to read the listening data. jmeter plugin provides a plug-in for reading serveragent data.
Agent installation and startupDownload the package at http://jmeter-plugins.org/downloads/all/
ServeragentRun startagent. BAT (Windows), startagent. Sh (Linux), and the system listens to port 4444.
C:\Users\elulian\Documents\cloudlu\Software\apache-jmeter-2.11\ServerAgent-2.2.1>.\startAgent.batINFO 2014-07-30 15:43:25.478 [kg.apc.p] (): Binding UDP to 4444INFO 2014-07-30 15:43:26.478 [kg.apc.p] (): Binding TCP to 4444INFO 2014-07-30 15:43:26.478 [kg.apc.p] (): [email protected] Agent v2.2.0 started
Jmeter collects data
Jmeter generates a Statistical Chart Based on the result
You can also use jmeter-plugins to extract data from jtl to generate corresponding charts.
java -jar $jmeter_path/lib/ext/CMDRunner.jar --tool Reporter --input-jtl cpu.jtl --plugin-type PerfMon --generate-png report-cpu.png >& /dev/nulljava -jar $jmeter_path/lib/ext/CMDRunner.jar --tool Reporter --input-jtl memory.jtl --plugin-type PerfMon --generate-png report-memory.png >& /dev/nulljava -jar $jmeter_path/lib/ext/CMDRunner.jar --tool Reporter --input-jtl diskIO.jtl --plugin-type PerfMon --generate-png report-diskIO.png >& /dev/null
PS:
1. In the past, server monitoring was independent. Now there are many excellent software that provides unified interfaces to monitor system usage and monitor the overall situation of a large LAN system, such as Nagios.
2. Graph Generation operations can be achieved through jmeter, there is a jmeter plug-in can execute SSH command http://code.google.com/p/jmeter-ssh-sampler/