(2), JMeter server performance monitoring installation

     During the stress test, it is very important to be able to control the health of the load server at any time. With this data, we can accurately analyze the server load bottleneck. When you're dealing with a cluster, isn't it great to know if the load is being distributed correctly? For these purposes, the JMeter plugin package now supports server monitoring! With this plugin, you can monitor server CPU, memory, swap, disk I/O, network I/O on almost all platforms!
JMeter is a stress testing tool that we can also use to monitor server resource usage. 
JMeter normally comes with Tomcat's /manager/status to monitor service resource usage. This situation can only monitor the part of the resource usage that Tomcat supports.
1. To download 
, you can go to the website http://jmeter-plugins.org/downloads/all/ to download resources, or you can go to CSDN to download. After downloading, you can use it directly without configuring other
CSDN download addresses: https://download.csdn .net/download/glongljl/10398265

 Among them, JMeterPlugins-0.5.1.rar is the client side, and ServerAgent is the server side.


2. Configuration 
Put the decompressed file of JMeterPlugins-0.5.1.rar into the apache-jmeter-3.0\lib\ext directory. 
 
Upload the decompressed file serverAgent.rar to the server to be monitored for use.

 


3. Loading 
1) apache-jmeter-3.0\bin\jmeter.bat Start JMeter 
After the normal startup is successful, the screenshot is as follows: 
Write the picture description here
 
If it cannot be started, check the jdk version or whether the jdk is installed correctly.


2) Check whether the plugin is loaded normally, as shown in the figure:


 
The ones starting with jp@gc appear after loading the plugin.


4. Run ServerAgent on the server to
log in to the server, run ServerAgent\bin\startAgent.sh (use startAgent.bat for non-Linux) 
(the default port is 4444, you can also specify –udp-port 4445 –tcp-port 4445 as a parameter) 
to see The output is as follows:
 
5. Add the listener "jp@gc - PerfMon Metrics Collector"
In the test plan in JMeter, according to the screenshot below, add the listener "jp@gc - PerfMon Metrics Collector" to
 
configure the IP, port and monitoring metrics (Note: the port here is the port on the server ServerAgent)
 
6. Check the monitoring results and
click the start button to view the ServerAgent log.
 
The following is the monitoring record (Note: The unit of Network I/O is B)
 


Note:
When running jmeter, Successfully connected and then immediately disconnected, and did not get the data we wanted. Conjecture requires a time-controlled component that allows it to acquire data over a period of time.
Solution:
add a thread group, set the number of cycles to "forever"; 
add a Sampler to the thread group (without setting parameters); 
add a PerfMon Metrics Collector listener; click to run. (If it has been added above, you can use it directly without adding it) 
Then in the jp@gc - PerfMon Metrics Collector interface, start.


7. Detailed process information of the server
If you need to locate the specific process that is abnormal, you can execute the 'top -n 1800 -b >top_monitor.txt' (note that it is updated every 3 seconds for 1800 seconds) during the stress test. If you need specific positioning, you can check the top_monitor.txt file by checking

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325973697&siteId=291194637