6
votes

I am running JMeter in distributed mode (1 master & 2 slaves).

In my master machine, I issue below command

jmeter -n -t script.jmx -r

It starts the test in both slave machines & works great. If i need to stop the test (in non-gui mode), If i press ctrl+c, It just stops the master. slaves keep executing the test. I also tried shutdown.cmd. master shows that 'shutdown received from 127.0.0.1` but did nothing.

Question:

What is the best way to stop test while it is running?

2
I don't think there is easy way provided by jmeter to handle such situation. Workaround would be to call stoptest.sh/cmd on each server from server remotely using ssh. I am not sure if this a valid requirement but you sure can log a bug/limitation on bugzilla Jmeter list. Post the reply here for everyone. Thanks.Nachiket Kate
@NachiketKate, thanks. I think it should be valid as the GUI mode gives an option for 'Remote Stop All' to stop the test abruptly. There is no option in non gui mode.KitKarson
Yes. Some mechanism/switch/option should be present in non-gui mode as well.Nachiket Kate

2 Answers

4
votes

Running shutdown.sh or stoptest.sh works well for me.

I run it on the master, the slaves receives the shutdown/stopsignal and starts to close down.

When running through jenkins, I issue the shutdown/stop command on the jenkins slave running the test.

0
votes

to stop the distributed test, you need to run the following command on the wizard: ./shutdown.sh do not forget to go to the jmeter / bin folder first. after running this command, the master will send all subordinates a command to stop the test