how to use perfmon in jmeter

To use PerfMon in JMeter, you must set up the PerfMon Metrics Collector plugin on your JMeter client machine and run the PerfMon Server Agent directly on the target server you want to monitor. This two-part architecture allows JMeter to fetch hardware-level metrics (like CPU, Memory, and Disk usage) over the network during your test. [1]
Here is the complete step-by-step guide to installing, configuring, and executing tests with PerfMon.
1. Install the PerfMon Plugin in JMeter
You need to add the PerfMon client components into your local JMeter installation. [1]
  • Open JMeter.
  • Navigate to Options > Plugins Manager.
  • Click on the Available Plugins tab.
  • Search for PerfMon (Servers Performance Monitoring).
  • Check the box next to it, then click Apply Changes and Restart JMeter.
  • Alternative: If you do not have Plugins Manager, download the JAR files from the JMeter-Plugins PerfMon Wiki and copy them manually into your JMeter lib/ext folder. [1, 2, 3, 4, 5]
2. Set Up the Server Agent on the Target Machine
The client plugin cannot collect metrics unless a listening agent is active on your target infrastructure. [1, 2]
  • Download the PerfMon Server Agent ZIP file from the JMeter-Plugins PerfMon Agent Repository or its GitHub page. [1, 2, 4]
  • Transfer and extract the ZIP file directly onto the target server (the application or database server you want to monitor). [1, 2]
  • Ensure Java is installed on that server. [1]
  • Open your server terminal or command prompt, navigate to the extracted folder, and run the startup script:
    • Windows: Double-click or run startAgent.bat.
    • Linux/Mac: Run chmod +x startAgent.sh and then execute ./startAgent.sh. [1, 2, 3]
  • Network Rule: By default, the agent listens on port 4444. Ensure your server firewall allows inbound traffic to port 4444 from the IP address of your JMeter machine. [1, 2, 3]
  • Tip: If port 4444 is restricted, bind it to a different open port using: ./startAgent.sh --tcp-port 5678. [1]
3. Configure the PerfMon Listener in JMeter
Now, connect your test plan to the listening server agent. [1]
  • Right-click your Thread Group > Add > Listener > jp@gc - PerfMon Metrics Collector. [1, 2]
  • In the configuration table, click Add Row. [1, 2]
  • Configure the following column fields for each metric you want to track:
    • Host / IP: The network IP address or hostname of your target server.
    • Port: 4444 (or your custom port).
    • Metric to Collect: Select from the dropdown (e.g., CPU, Memory, Disk I/O, or Network I/O).
    • Metric Parameter: (Optional) Leave blank for overall server metrics, or specify parameters like a specific process name (e.g., pid=1234 or name=java) to isolate software instances. [1, 2, 3, 4, 5, 6, 7]
4. Run the Test and Collect Data
  • GUI Mode (Debugging Only): Click the green Start button in JMeter. The PerfMon window will graph real-time system metrics concurrently alongside your active load test. [1, 2, 3, 4, 5]
  • Non-GUI Mode (Production Execution): Do not use the GUI for heavy load tests. To log PerfMon metrics during command-line execution, you must define a distinct results file inside the listener properties:
    1. In the PerfMon Listener GUI, type a file path in the Filename field (e.g., perfmon_results.jtl). Note: Ensure this filename is completely separate from your primary JMeter sampler results file.
    2. Run your CLI command normally.
    3. Once the test completes, open the JMeter GUI locally, add a blank PerfMon Metrics Collector, and use the Browse button to load the perfmon_results.jtl file to visualize the historical resource graphs. [1, 2, 3, 4, 5]
Summary of System Options
You can further customize properties inside your local jmeter.properties file if needed: [1, 2, 3]
PropertyDefault ValueDescription
jmeterPlugin.perfmon.interval1000Metric pulling frequency in milliseconds.
jmeterPlugin.perfmon.useUDPfalseFallback to UDP if the TCP connection fails.
forcePerfmonFilefalseForces auto-writing of JTL metrics to the working path.
If you run into issues, please let me know:
  • What Operating System is running on your target server?
  • Are the JMeter client and target server on the same network / machine, or separated by a cloud firewall?
  • Are you looking to track overall server health or a specific process (like a Java JVM)?
I can give you specific configurations or troubleshooting commands based on your setup.
  • Using perfmon on Jmeter - problems monitoring by process name
    Oct 29, 2018 — Using perfmon on Jmeter - problems monitoring by process name * 1 Answer. Sorted by: I don't think the process is called kafka , m...
    Stack Overflow
  • PerfMon :: JMeter-Plugins.org
    It supports over 75 system metrics, including: * **jmeterPlugin.perfmon.interval** Metrics collection interval in milliseconds * *
    JMeter-Plugins.org
  • How to Setup PerfMon Collector in JMeter
    May 19, 2022 — now we will see how to set up permon metric collector by using the Jetter. and permon to uh uh agent or perform agent in Jer. so f...
    Related video thumbnail
    6m
    YouTube·Task Incomplete
Show all

Post a Comment

0 Comments