在 Unix 机器上执行 Jmeter
您好,我正在使用 Jmeter 2.4 并扩展它,创建一个 jmeter 组件 jar,放置在 libs 的 ext 子文件夹中。我还创建了一些测试计划 jmx 文件。这些都在本地运行 find。我已将整个 jmeter 目录放在我的 Unix 机器上,创建了一个 shell 脚本来启动它,该脚本由一行组成。
java JVM_ARGS="-Xms1024m -Xmx1024m" jmeter -t Block1Thread-1000.jmx
我也尝试过
java JVM_ARGS="-Xms512m -Xmx512m" jmeter -t Block1Thread-1000.jmx
,但都返回
script.sh: line 32: java: command not found
My Unix israther 101 所以我可能会错过一些愚蠢的东西。
干杯
Hello I'm working with Jmeter 2.4 and extended it creating a jmeter components jar, placed within the ext subfolder of libs. I've also created some test plans jmx files. These all run find locally. I've placed the whole jmeter directory on my Unix box, created a shell script to start it which consists of one line.
java JVM_ARGS="-Xms1024m -Xmx1024m" jmeter -t Block1Thread-1000.jmx
I have also tried
java JVM_ARGS="-Xms512m -Xmx512m" jmeter -t Block1Thread-1000.jmx
But both return
script.sh: line 32: java: command not found
My Unix is rather 101 so I'm could be missing something silly.
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来 java 没有添加到您执行命令的计算机的
PATH
环境变量中。使用
echo $PATH
检查命令行?Sounds like java is not added in the
PATH
environment variable of the machine you're executing the command on.Check on the command line with
echo $PATH
?首先,确保 java 已正确安装,并且您在用户配置文件中设置了 JAVA_HOME 和 java bin 目录的路径。
接下来,需要将 JVM_ARGS 设置为环境变量。这意味着您尝试执行的命令需要是两个命令,第一个是
第二个可能只是
请注意,第二个命令可能会失败,Linux 会告诉您该脚本不可执行。您可以通过执行以下操作来更改它:
在 jmeter 安装的 /bin 目录中。
First, make sure java is properly installed, and that you have JAVA_HOME and a path to the java bin directory set in your user profile.
Next, the JVM_ARGS need to be set as an environment variable. This means that the command you're trying to execute need to be two commands, the first being
And the second probably just being
Please note that the second command may fail, and Linux will tell you that the script is not executable. You can change that by doing:
In the /bin directory of your jmeter installation.