JMeter Monitoring
Apache JMeter is limited in it’s monitoring and analysis capability. It does produce HTML graphs which provide a transaction breakdown. Unlike Micro focus Loadrunner, it doesn’t have the capability (out of the box) to integrate hardware counters. However, there is a extension called PerfMon (Servers Performance Monitoring). It is NOT windows perfmon but a java client/server application that allows you to collate resources and pass them into JMeter.
Installation
Perfmon Server Agent
Downlaod Perfmon Server Agent
Extract the downlaoded zip which will be named “ServerAgent-x.x.x.zip”
Open a command prompt.
Navigate to the extracted ServerAgent directory.
Run the startAgent.sh (Linux) or startAgent.bat (Windows)
By default the agent will launch on port 4444 but this can be changed if required.
Perfmon Metrics Collector
Launch Apache JMeter.
Navigate to Options > Plugins Manager. (Plugin Manager needs to be installed first)
Search for “Perfmon” and select the returned Perfmon (Servers Performance Monitoring) and click Apply Changes and Restart JMeter
Usage
With the ServerAgent installed and running along with perfmon metrics collector you can now add Perfmon into your test plan.
Add a Thread Group, and set the loop count to infinite and the duration to 60 seconds.
Add a Dummy Sampler
Navigate to Listeners and add “jp@gc - PerfMon Metrics Collector”.
Add row and ensure you set the Host/IP and port. The you can select the counter type from “CPU”, “Memory”, “Swap”, “Disk I/O”, “Network I/O”, “TCP”, “JMX”, “Exec” and “Tail”.
By default CPU will be selected, lets add this row.
Add a second row and choose Memory.
Add a third row for Disk I/O.
Add a fourth row for Network I/O.
Now execute the test and you should see the jp@gc - PerfMon Metrics Collector graph populate similar to below.
Perfmon provides a means of collecting basic counters which is an improvement on vanilla Apache JMeter. It can be another tool in the analysis process. However, it still makes sense to monitor in more detail on the server side to enable greater depth of analysis.
FURTHER READING
Blazemeter - How to Monitor Your Server Health & Performance During a JMeter Load Test