CPU and Memory Monitoring via PTQL in JMeter PerfMon on Linux

48 views
Skip to first unread message

deeksha dev

unread,
May 7, 2025, 4:44:52 PMMay 7
to jmeter-plugins
Hi Team,

I have two queries related to performance monitoring using JMeter on a Linux environment and would appreciate your guidance:
  1. CPU and Memory Monitoring Command/Package in Linux
    Could you please let me know which Linux command or package is used to capture CPU and memory utilization for a specific PID? We are currently retrieving the PID using PTQL (used in the PerfMon Metrics Collector in JMeter).

  2. Unexpected Output in PerfMon Metrics Collector
    In our JMeter test plan, we have a Thread Group configured with:

    • 20 threads,

    • 500 loops,

    • Ramp-up period of 1 second,

    • Using the Java Request sampler,

    • And the same user repeated for each iteration.

    The jp@gc - PerfMon Metrics Collector is placed within the same thread group and outputs to a CSV file. Both JMeter and the ServerAgent are running on the same Linux server.

    However, the CSV output includes repeated 0 values for CPU usage, as seen below (example):

    python-repl
    CopyEdit
    1.7465E+12, 0, localhost CPU ptql=State.Name.eq=java,Args.*.sw=./XXX.jar:percent ... 1.7465E+12, 311688, localhost CPU ptql=State.Name.eq=java,Args.*.sw=./XXX.jar:percent

    We're occasionally receiving actual values, but many entries show 0, especially for CPU metrics. Memory values seem consistent. We've ensured that both JMeter and ServerAgent are on the same host.

Could you help identify what might be causing these intermittent 0 values for CPU and whether the PTQL expression needs to be refined? Any suggestions or troubleshooting steps would be appreciated.

Best regards,

Deeksha Dev

vikas giri

unread,
May 8, 2025, 1:20:23 AMMay 8
to jmeter-...@googlegroups.com
Hi Team,

I'm looking for guidance on how to perform client-side performance testing using JMeter with multiple functionalities running concurrently. Specifically, I want to simulate the following scenario:

1. 20 users log in to the application simultaneously.
2. Once logged in, the next 20 users visit different pages (e.g., dashboard, reports, settings).
3. During this process, I want to check the performance of the application and ensure that input data is inserted into the database correctly when sending parameters from JMeter.

Can anyone provide guidance on how to achieve this using JMeter? Specifically, I'd like to know:

- How to configure JMeter to simulate multiple users logging in and visiting different pages concurrently.
- How to pass parameters from JMeter to the application and verify that the data is inserted into the database correctly.
- What metrics I should collect to measure the performance of the application during this test.

Any help or guidance would be greatly appreciated.

## Additional Details
- Application technology stack: [insert tech stack, e.g., Java, Spring, MySQL]
- JMeter version: [insert JMeter version]

Thanks in advance for your responses!



--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jmeter-plugins/9d98bad6-0153-46c4-9999-590ca964d172n%40googlegroups.com.

Dmitri T

unread,
May 9, 2025, 6:25:25 AMMay 9
to jmeter-plugins
You need to surround your query with quotation marks.

More information:


Also looking into your query it seems that you're trying to monitor the system under test, in this case you need to run the Server Agent on that machine

Dmitri T

unread,
May 9, 2025, 6:30:40 AMMay 9
to jmeter-plugins
  • How to configure JMeter to simulate multiple users logging in and visiting different pages concurrently. - you can control the number of users in Thread Group. There you can also specify the number of loops and/or duration of the test depending on what you're trying to achieve. If you want 20 users to do action only once - set loop count to 1. If you want all users to do something at exactly the same moment - use Synchronising Timer. If you want different users to execute different actions - use Throughput Controller
  • How to pass parameters from JMeter to the application and verify that the data is inserted into the database correctly. - you need to ensure that JMeter is configured to behave like a real browser and all dynamic values are properly correlated 
  • What metrics I should collect to measure the performance of the application during this test. - all which you can get, JMeter metrics are described in JMeter Glossary plus you might want to collect system under test side metrics like resources usage and profiler or APM tool output
Reply all
Reply to author
Forward
0 new messages