Skip to main content

Development

How to monitor the server’s system resource using JMeter Plugin

JMeter has many listeners which provide useful information like each request’s response time, number of the requests processed, response data, throughput, error%, etc. but actually we would like to know the utilization of server system resource, like CPU/Memory utilization. The ServerAgent can collect the server performance metrics, and one JMeter plugin can provide a visual report to us.

The ServerAgent will open the port 4444 by default and start a thread to listen all data on the server machine, and it also allows the external system to read the listened data and the JMeter plugin jp@gc – PerfMon Metrics Collector can listen to the ServerAgent on the server.

Here are steps to monitor the server performance metrics:

  1. Go to http://jmeter-plugins.org/downloads/all/ and download the latest release of JMeterPlugins-Standard-1.3.1.zip, ServerAgent-2.2.1.zip and JMeterPlugin-Extras-1.3.1.zip

1

  1. Unzip the JMeterPlugins-Standard-1.3.1.zip and JMeterPlugin-Extras-1.3.1.zip and copy JMeterPlugins-Extras.jar and JMeterPlugins-Standard.jar under %JMETER_HOME%\lib\ext
  1. Upload the ServerAgent-2.2.1.zip to the server you want to monitor, Unzip ServerAgent-2.2.1.zip and start startAgent.sh. It will launch the default port 4444 and the following message is displayed.

2

  1. Launch Jmeter.bat, right click Test plan – > listener, you will see a lot of Listeners/Reports which start with “jp@gc” are available now.

3

  1. Add jp@gc – PerfMon Metrics Collector under your Test Plan, and add the server Host/IP and Port, choose the metric to collect, see below:
  • Host/IP –> Host or IP address of the server where the ServerAgent runs.
  • Port –> Port through which listener can talk to ServerAgent.
  • Metric to Collect –> CPU, Memory, Disks I/O…etc. It is a drop down. Select the metric you want to monitor
  • Metric Parameter –> Specific parameter in case of any for the Metric. For example, if we need to collect the metric for a specific process, add the process Identifier. For ex: pid=4448
  1. Now everything is ready and clicks Run to start the JMeter test, you can see the server’s CPU and Memory utilization have been collected.

4

Right click on the chart, you can save the chart as an image or export the result to a CSV file.

5

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories
Follow Us
TwitterLinkedinFacebookYoutubeInstagram