How to Monitor Your Server Health During a JMeter Load Test Using Perfmon



Performance Testing is not just about scripting and execution. It is also important to analyze your performance test result and identify the performance bottleneck.

If you run a load test, got the test results, and now you found that your average response time is breaching the SLA. The question is “WHY”?

There can be multiple reasons for high response time like Network issue, Application code issue or Server health issue.

In this article, I will explain to you that how we can monitor the server health in JMeter during a load test.


How to Collect & Monitor Server Health Metrics Using Perfmon Plugin

 

There are two steps:


1.    Run Perfmon agent on Server.

2.   Use Perfmon Metric Collector Listener In JMeter.



1. Run Perfmon agent

First step is to download the Perfmon agent on your server machine.


Perfmon agent is a java command line application and hence you must have Java Runtime Environment (JRE) installed on your server machine.

 

Step1: Download the Perfmon agent.

Step2: Unzip the package.

Step3: Run “startAgent.bat” file.

 

 

The agent has been started and it’s running on port 4444.



2. Use Perfmon Metric Collector Listener In JMeter

 

Step1: Download Metric Collector Listener.

Step2: Add the plugin files to your JMeter’s “lib” and “lib/ext” folder.

Step3: Restart the JMeter.

Step4: Right click on Test Plan > Add > Listener > jp@gc - PerfMon Metrics Collector

 

You need to add the ServerName, Port Number and Server Metric which you want to monitor using the “Add Row” button. You can add multiple metrics as per your requirement.

 

Port Number must be the same as your perfmon agent’s port number. In our case, it’s 4444.


 

Now start your load test and you should be able to see the graphs under the PerfMon Metrics Collector listener.



No comments

Powered by Blogger.