How to Monitor Server Health & Performance of Linux machine during Load Test with JMeter


Whenever there is an increase in the average response time of the application under load test, one of the parameters that we need to monitor is the system’s resource utilization (CPU, Memory or disk usage); however, the system can be monitored with the Perfmon metrics collector plugin available in JMeter.

Perfmon plugin consists of two parts.

  1. Server agent that should be installed at the application server
  2. The Metrics collector listeners

How to set up a server agent on a Linux server.

Prerequisites: Java should be installed on the server.

 1. Download the server agent on the server where the application is deployed using the following command:

wget https://github.com/undera/perfmon-agent/releases/download/2.2.3/ServerAgent-2.2.3.zip

2. Unzip the downloaded folder using the following command

unzip ServerAgent-2.2.3.zip

3. Navigate to the unzipped folder and grant read, write, execute permissions to startAgent.sh

cd ServerAgent-2.2.3 sudo chmod 777 startAgent.sh

4. Start the server agent ./startAgent.sh

Note: The server agent will collect metrics and send them to Jmeter by UDP or TCP protocol, where the default port is 4444. To run the server agent on a different port use the following command

./startAgent.sh --udp-port 3450 --tcp-port 3450

How to configure Metrics collector listeners in JMeter to capture the CPU and memory utilization of application under test

Prerequisites: Java should be installed on the machine and JMeter application should be downloaded, Configure PerfMon (Servers Performance Monitoring) plugin in JMeter on the system in which CPU and Memory utilization would be capture

1. Add Perfmon Metrics collector listeners to the configured thread groups and configure the IP and the host name of the server to be monitored.

2. Start the test. The Perfmon Metrics collector will start capturing the configured resources (i.e CPU, Memory, Disk I/), Network I/O, etc).

Leave A Comment

Your email address will not be published. Required fields are marked *