Site icon Vinsguru

JMeter – Server Performance Metrics Collector

JMeter has many listeners which provide useful information like

But….What about the server performance metrics? like CPU / Memory utilization.

JMeter is not only generating the load on the server but also comes with an agent which can run on the server machine to collect the server performance metrics.

In this article, lets see how the Server Performance Metrics Collector works.


Install Server Agent:

 

For JMeter Version V2.13 or below

  1. Download the latest server agent from JMeter-Plugins.
  2. Unzip this file. Place the entire folder in some location on the server.
  3. Server should have Java JRE to run this server agent.
    • Install Java Runtime Engine.
    • Java bin should be included in the PATH (environment variables)
  4. You need to open the port 4444 (default) on the server machine.
  5. Start the startAgent.bat/startAgent.sh
    • startAgent.bat –tcp-port 5555 (if you need to use different port, pass the port as argument).

It would be very simple if the server machine has Java already. The agent has started running at this point.

PerfMon Metrics Collector:

To listen to the agent running on the server, JMeter has a separate listener called – PerfMon Metrics Collector. It is available as part of jmeter-plugins Standard Set. We also have a Plugin Manager for JMeter for easy plugin installation.

 

  1. Download the latest standard set from jmeter-plugins.
  2. Unzip the file content. Copy the lib folder  & paste it under JMETER_HOME.
  3. Restart JMeter
  4. Now you should see jp@gc – PerfMon Metrics Collector under Listeners.

 

OR

  1. Use Plugin Manager to install PerfMon plugin which is responsible for collecting the metrics.

 

That’s it. Lets try this set up.

Test the Agent & Metrics collector:

JMeter Test:

 

Listener:

 

Now everything is ready to test! Start the JMeter test.

CPU Utilization %:

During my test on the tomcat server, the CPU utilization of the server machine was as given below – for 20 users, the machine started using 100% of CPU.

Next time you do your load testing, other than Response Time, Median, Throughput etc,  start measuring Memory & CPU utilization as well with JMeter listeners.

 

Non-GUI Mode:

If you run JMeter in non GUI mode and want to save monitoring data to file, just configure result file saving in GUI as you do with other listeners. After running the test you may load saved file into GUI and see the values timeline. For more details, please visit.

 

InfluxDB + Grafana:

If you would like to use InfluxDB + Grafana dashboard for these metrics, please check this article.

 

 

Happy Testing & Subscribe 🙂

 


Share This:

Exit mobile version