1. Description
JMeter is a stress testing tool.
Usually in stress testing, we also need to monitor and know the relevant resources of the server. jmeter itself does not have this function. Today we mainly talk about how to monitor the server CPU, memory, disk, network and other related resources through the JMeter plug-in.
Plugin download address: ( https://jmeter-plugins.org/downloads/old/ )
ServerAgent-2.2.1.zip
JMeterPlugins-Standard-1.4.0.zip
JMeterPlugins-Extras-1.4.0.zip
Among them, JMeterPlugins-Standard and JMeterPlugins-Extras are on the client side, and ServerAgent is on the server side.
(/Laughing and crying can't download the latest ServerAgent, leave a message with the address and share with me, thank you very much)
2. Steps
Step 1: Add a client plugin in jmeter
Unzip JMeterPlugins-Standard-1.4.0.zip, enter its path JMeterPlugins-Standard-1.4.0\lib\ext, and find JMeterPlugins-Standard.jar
Unzip JMeterPlugins-Extras-1.4.0.zip, enter its path JMeterPlugins-Extras1.4.0\lib\ext, and find JMeterPlugins-Extras.jar
Put JMeterPlugins-Standard.jar and JMeterPlugins-Extras.jar in the lib/ext directory under the JMeter installation directory
Restart Jmeter, the beginning of jp@gc- appears in the listener, indicating that the jar package was imported successfully
A brief introduction to common components:
(1) jp@gc - Bytes Throughput Over Time : In the aggregated report of throughput display (chart) at different times , Throughput is displayed by the number of requests, such as 1.9/sec , that is, 1.9 requests are sent every s ; and here The display is a chart displayed by bytes Bytes
(2) jp@gc - Composite Graph : How many graphs can be set in the hybrid graph to display together
in its Graphs , it can display multiple graphs at the same time
(3) jp@gc - Hits per Second : Hits per second
(4) jp@gc - PerfMon Metrics Collector : Server performance monitoring controls, including CPU , Memory , Network , I/O , etc.
(5) jp@gc - Reponse Latencies Over Time : Record the time before the server returns the request after the client sends the request.
(6) jp@gc - Reponse Times Distribution : Displays the response time distribution of the test, the X- axis shows the response times grouped by time interval, and the Y- axis contains the number of samples per interval
(7) jp@gc - Transactions per Second : the number of transactions per second, the number of transactions processed by the server per second
Step 2 : Add the plugin on the server
Copy ServerAgent-2.2.1.jar to the server, decompress it (start startAgent.bat in windows server , start startAgent.sh in Linux server ), print out the right part of the figure below, that is, the startup is successful
Step 3 : Add PerfMon Metrics Collector to monitor server performance
HTTP request (right mouse button)---->Listener---->jp@gc - PerfMon Metrics Collector
Then analyze the collected data and you're done!