JMeter measures your application from the client side: response times, throughput and errors. To see what the servers do under that load, the classic JMeter answer is PerfMon, the Servers Performance Monitoring plugin from the JMeter Plugins project. It has two parts: the PerfMon Metrics Collector, a listener you add to the test plan, and ServerAgent, a small Java program you start on every server you want to watch. The agent reads CPU, memory, swap, disk I/O, network I/O and TCP connection metrics and sends them to JMeter over TCP or UDP, port 4444 by default, and the listener plots them on the same timeline as the test. This guide is for performance engineers and QA teams who need JMeter server monitoring during a load test. It shows how to install the PerfMon plugin and the agent, which metrics you can collect, how to keep the data in non-GUI runs and the limits you should know before you rely on it, because the agent is old. Then it shows how to monitor servers during a test on PFLB Platform, strictly as the PFLB documentation describes it. We checked the facts on 17 November 2026 against the PerfMon wiki page, the ServerAgent README and releases, and the PFLB documentation.
How JMeter PerfMon Works: Metrics Collector and ServerAgent
A load test tells you that response times grew at 400 users. It does not tell you why. Server monitoring during a load test answers the second question: did a CPU saturate, did memory run out and the server start to swap, did a disk queue grow or did the network hit its limit? PerfMon puts those server metrics next to the JMeter results, so you can see which resource ran out first.
| Part | Where it runs | What it does |
|---|---|---|
PerfMon Metrics Collector (listener jp@gc - PerfMon Metrics Collector) | In the JMeter test plan | Connects to one or more agents, asks for the metrics you list and draws them as graphs over the test time; can write them to a file |
| ServerAgent | On each monitored server (application, database, web server) | Collects system metrics with the SIGAR library and answers the collector over TCP or UDP; port 4444 by default |
The agent does not need JMeter on the server and, according to its README, needs no root or admin privileges (ServerAgent README). It uses a plain-text protocol, which is handy for a quick check before the test (shown below).
Install the JMeter PerfMon Plugin and Start ServerAgent
- Install the plugin. In the JMeter GUI, open Options, Plugins Manager, go to Available Plugins and tick PerfMon (Servers Performance Monitoring), then Apply Changes and Restart JMeter. If there is no Plugins Manager in the menu, put its JAR into
lib/extfirst (JMeter Plugins, Plugins Manager). On a machine without a GUI, use the command line tool:PluginsManagerCMD install jpgc-perfmon. - Download the agent. Take the ServerAgent zip (the latest release is 2.2.3) from the perfmon-agent releases and unpack it on each server you want to monitor. The README asks for a Java runtime on that server.
- Start the agent. Run
startAgent.shon Linux and other Unix systems orstartAgent.baton Windows. The server agent opens TCP and UDP ports, 4444 by default, and prints problems gathering metrics to its console, so keep that console in view during the first run. - Open the port. Make sure the JMeter machine can reach the agent's port: the PerfMon wiki names a firewall as the usual reason the collector cannot connect (JMeter Plugins, PerfMon).
- Add the listener. In the test plan, add Listener, jp@gc - PerfMon Metrics Collector, then add one row per metric: host, port, metric type and an optional metric parameter.
The agent takes a few options that are worth knowing (ServerAgent README):
./startAgent.sh --udp-port 0 --tcp-port 3450 # TCP only, on port 3450 (0 disables a port)
./startAgent.sh --interval 5 # collect every 5 seconds
./startAgent.sh --auto-shutdown # stop when the last client disconnects
./startAgent.sh --no-exec # disable the exec and tail metrics
./startAgent.sh --sysinfo # list processes, file systems and interfaces
The --interval option changes the metrics collection frequency on the agent side. To check that the agent answers before you start the test, connect to it with telnet from the JMeter machine and type test; the agent replies Yep, and exit closes the connection:
telnet app-server-01 4444
test
Yep
exit
The listener uses the same plain-text protocol, and the README lists its commands for anyone who wants to read the server agent from other applications or a third-party client app: metrics:cpu starts automatic metrics collection, interval:5 changes the metrics reporting interval, metrics-single:memory asks for a single value, exit terminates the current client session, and shutdown closes all client connections and stops the agent process. Each metric specification consists of fields separated by colons, such as cpu:idle, and the metric collection output consists of numbers separated by tabs.
PerfMon Metrics: What the Collector Can Show
Each row of the PerfMon Metrics Collector asks one server agent for one metric. The metric parameter narrows it down: a CPU core, a process, a file system or a network interface, followed by the value you want. Without a parameter you get the default value for the metric type.
| Metric type | Default value | Other values and selectors (examples from the docs) |
|---|---|---|
| CPU | combined (100 minus idle) | idle, system, user, iowait; one core with core=2:user; one process with name=java#2:user or pid=14523:percent |
| Memory | usedperc | freeperc, used, free; for a process resident, virtual, shared |
| Swap | used | pagein, pageout, free, total |
| Disks I/O | queue | reads, writes, readbytes, writebytes; one file system with fs=/home:writes |
| Network I/O | bytesrecv | bytessent, rx, tx; one interface with iface=eth0:tx |
| TCP | estab (established connections) | time_wait, close_wait |
| JMX | JVM metrics of a Java application that exposes JMX: gc-time, memory-usage, memorypool-usage, class-count, compile-time | |
| EXEC, TAIL | Run a command or read a file that prints one number per line, for a custom metric |
The values and examples are from the ServerAgent README and the PerfMon wiki page. Beyond CPU metrics and memory, for a Java application server the JMX type is often the most useful one: it shows garbage collection time and heap use, which explain many response time spikes. The JVM has to expose JMX for it, for example with -Dcom.sun.management.jmxremote.port=4711.
Keep PerfMon Data in Non-GUI Runs
Real load runs go in non-GUI mode, where no graph is drawn. The PerfMon wiki says to configure result file saving in the listener in GUI mode, as with any other listener; the non-GUI run then saves the monitoring data to that file, and afterwards you load the saved file into the listener in the JMeter GUI. The plugin also reads a few JMeter properties, for example in user.properties:
# collection interval, milliseconds
jmeterPlugin.perfmon.interval=1000
# write a PerfMon JTL file to the current directory
forcePerfmonFile=true
PerfMon Limits to Know Before You Trust the Numbers
PerfMon still works for many teams, but it was built for a different time. Check these points before you plan a test around it:
- An old metrics library. The agent collects metrics with SIGAR. The README itself warns that SIGAR is out of date and was last updated in 2010, so ServerAgent won't work on many modern systems. Try it on the exact OS of your servers before the test day.
- Little development. The latest ServerAgent release is 2.2.3, and its release note is one line: a flag for a safer run.
- Security. The README warns that the agent can be a shell exec vulnerability: the EXEC metric runs commands on the server. Start it with
--no-execunless you need EXEC or TAIL, keep the port closed to everyone except the load generators, and stop the agent after the test (--auto-shutdownhelps). - Hosts, not containers. The metric types are host level: CPU, memory, disks, interfaces, processes. There is no container metric type, so with Docker or Kubernetes you see the host and its processes rather than a container as such, and you start an agent on each host yourself.
- One more thing to install. Every server needs the server agent, a Java runtime and an open port, and every new server in the test needs the same setup again.
If these limits rule PerfMon out, the common alternative is a metrics agent such as Telegraf or a Prometheus exporter on the servers, a time series database and Grafana, with JMeter results sent to the same Grafana through the Backend Listener. Our guide to the JMeter Grafana dashboard shows the JMeter side of that setup. It works well, but you run the whole stack yourself.
Monitor Servers During a PFLB Test
PFLB Platform collects system metrics of the tested servers with a Telegraf agent that you start on each server, and shows them in a Grafana dashboard with system metrics for each test run. This works for tests built in the platform and for JMeter tests imported from a JMX file. What the documentation describes:
- A settings set with monitoring. On the Tests page, open the Settings tab, add a settings set and go to the Monitoring tab. Choose system metrics from the list: Disk input/output system, UDP metrics, TCP metrics, Kernel metrics and Docker metrics. Each comes with Grafana dashboard panels; for example, the TCP metrics include established connections, time wait and socket counts, and the Docker metrics use the Docker Engine API to show running and stopped containers and their CPU usage, memory usage, traffic and disk I/O (PFLB docs, settings sets).
- The agent package. Click Generate and save, and the platform gives you a link to
system_monitoring.tar.gz. The archive containstelegraf.conf, the config of the Telegraf agent,docker-compose.yaml, the Docker Compose file that deploys the agent, andstart.sh, the script that starts and configures the monitoring. - On each server. Install Docker and Docker Compose, give the server access to the public Docker Hub or download the Telegraf image in advance, copy
system_monitoring.tar.gzto every server of the tested system and runstart.shon each one (PFLB docs, FAQ). - JMeter tests. Link the settings set to the test. For tests imported from JMX, the documentation says that only the monitoring and webhook settings of a settings set apply (PFLB docs, import from JMX), so the monitoring is set up in the platform, not in your JMeter script.
- During and after the run. In the Test runs in progress pane, click Test Details, then Detailed system metrics, to open the dashboard with system metrics while the test runs; after the test, open the test run and click Detailed system metrics (PFLB docs, visualizing tests in Grafana).
- SLA on server metrics. With the settings set linked, you can add an SLA for a host of the tested system on average CPU usage or average memory usage, with a threshold and an optional period (PFLB docs, import from JMX).
- Reports. A report can include a System Metrics chart for a host: CPU utilization in percent and per CPU, disk total and utilization, RAM total and utilization, and system load average (PFLB docs, reports).
- Metrics from your own tools. If you already collect server metrics elsewhere, for example in your own Grafana, you can export a metric to CSV and import it into the test run, then show it in a report chart (PFLB docs, test run).
The same settings set can be linked to other tests, so you set up the monitoring once and reuse it. If the test itself runs from several load generators, our page on distributed JMeter testing describes how the platform handles that for JMX scripts.
The documentation does not describe application performance monitoring, such as traces or code-level profiling, automatic detection of the cause of a slowdown, or an agent that runs without Docker. The platform shows the server metrics in the same test run as the load results; reading them is still the engineer's job.
PerfMon or a PFLB Settings Set: Which Fits
| PerfMon with ServerAgent | Monitoring in a PFLB settings set | |
|---|---|---|
| Agent on the server | ServerAgent, Java, SIGAR library | Telegraf in Docker, started with start.sh |
| What you install on the server | Java runtime and the agent, open port | Docker, Docker Compose, the Telegraf image |
| Metrics | CPU, memory, swap, disks, network, TCP, JMX, custom EXEC and TAIL | Disk I/O, UDP, TCP, kernel and Docker metrics with dashboards; CPU, RAM and load average in reports and SLAs |
| Containers | Host level only | Docker metrics of running containers |
| Where you see the data | The PerfMon listener in JMeter, or a file you load into it | Grafana dashboard with system metrics, during and after the run |
| Pass or fail on server metrics | You check the graphs yourself | SLA on average CPU or memory usage per host |
| A good fit | A quick test with a few servers on a system where the agent still runs | Repeated JMeter tests where server metrics should sit next to every run |
Both routes need something on the tested servers, so plan that access with the team that owns them before the test day.
If you want help deciding what to monitor and how to read the results, PFLB's performance engineers design the load model, set up monitoring of the tested system, run the performance tests and explain where the bottleneck is.