jp@gc perfmon: Do monitored processes need to be running at time of test start?

107 views
Skip to first unread message

ne...@moogsoft.com

unread,
Mar 22, 2017, 11:30:17 AM3/22/17
to jmeter-plugins
Hi,

Apologies if this question has been answered before.

I'm using perfmon 2.1 with jmeter 3.1

Do processes monitored by perfmon need to be running at the time the jmeter test starts? I'm trying to capture some sporadic processes that run for a short time (maybe 10-30secs) then die. Obviously their pids will be changing but I'm keen to correlate their activity with response times I'm capturing.

I've setup per process metrics that *should* catch them if the appear (PTQL query for a java process) but so far I've not see any of them appear in my perfmon results. Here's an example to capture CPU of one of the intermittent processes:


Appreciate any pointers.

thanks,

Neil

ne...@moogsoft.com

unread,
Mar 29, 2017, 7:22:07 AM3/29/17
to jmeter-plugins, ne...@moogsoft.com
Digging further - it looks like they do need to be running when the test starts. Saw some errors in the agent log that it couldn't find a matching process when the test started. Guess it only tries the once at startup.

Shame :-(

Anyone know how to handle such dynamic processes in perfmon? Maybe an enhancement request?

thanks,

Neil

Till Neunast

unread,
Jul 5, 2017, 3:26:20 AM7/5/17
to jmeter-plugins, ne...@moogsoft.com
Anyone know how to handle such dynamic processes in perfmon? Maybe an enhancement request?
 
If you can make an SSH connection to the server you can use this JMeter plugin https://github.com/tilln/jmeter-sshmon

You could then run a shell command like top or pidstat and filter the output for the metric you're interested in e.g. CPU utilization of the process.

If the process does not exist you would have to make sure to output a numeric value anyway or else SSHMon will complain.

Example:
top -n 1 -d 1 -b -c | awk '/[e]vents_analyser/{cpu=$9} END{print(cpu=="")?-1:cpu}'

Top (1 sample, 1 second, -batch mode so it does not need a terminal, optionally -command line args if the process name alone is not unique), filtered for the process (using a regexp to avoid matching the awk command itself) and printing a -1 when no process is found (which the plugin won't plot).

HTH
Reply all
Reply to author
Forward
0 new messages