Running a JMeter script with nohup

依然范特西╮ 提交于 2019-12-24 05:55:34

问题


For the first time I'm just playing around with nohup on top of an Ubuntu server. I read few docs about nohup and got to know about the running commands with options such as nohup ./server.sh &.

What I want to know is that, how should I be running the JMeter script (in headless mode) using nohup? Following is the script I needed to run with nohup:

./jmeter.sh -n -t /home/chamith/WSO2MB/new/apache-jmeter-2.13/bin/GamesSubscriber.jmx

When I tried using the normal nohup operation within the script it always throws me an error saying -n command not found. How should I move on with this? Any help would be appreciated.


回答1:


Although I cannot reproduce your issue you can try surrounding your command with quotation marks like:

nohup "./jmeter.sh -n -t /home/chamith/WSO2MB/new/apache-jmeter-2.13/bin/GamesSubscriber.jmx"

Also don't forget -l key to save the results into a file.

The full command which runs script totally in the background will look like:

nohup "./jmeter.sh -n -t /home/chamith/WSO2MB/new/apache-jmeter-2.13/bin/GamesSubscriber.jmx -l result.jtl" > /dev/null 2>&1 &

References:

  • nohup man page
  • nohup Execute Commands After You Exit From a Shell Prompt
  • How Do I Run JMeter in Non-GUI Mode?
  • Full list of JMeter command-line options


来源:https://stackoverflow.com/questions/37254495/running-a-jmeter-script-with-nohup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!