If you can make an SSH connection to the server you can use this JMeter plugin
https://github.com/tilln/jmeter-sshmonYou
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