使用nohup运行JMeter脚本 [英] Running a JMeter script with nohup
问题描述
我第一次是在Ubuntu服务器之上玩nohup
.我读了一些有关nohup
的文档,并了解了带有诸如nohup ./server.sh &
之类选项的正在运行的命令.
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 &
.
我想知道的是,我应该如何使用nohup
运行JMeter
脚本(无头模式)?以下是我要在nohup
上运行的脚本:
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
当我尝试在脚本中使用常规的nohup
操作时,它总是向我抛出一个错误,提示-n command not found
.我应该如何继续呢?任何帮助,将不胜感激.
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.
推荐答案
尽管我无法重现您的问题,但是您可以尝试用双引号将您的命令引起来:
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"
也不要忘记按-l
键将结果保存到文件中.
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 &
参考:
- 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
这篇关于使用nohup运行JMeter脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!