使用nohup运行“没有此类文件或目录”的JMeter脚本]]

问题描述 投票:0回答:1

使用主从模型运行负载模拟,同时使用nohup从命令行运行测试,并给出“无此类文件或目录”。

因此,我有两个天蓝色的ubuntu虚拟机(一个是主机,一个是从机)并通过腻子连接。在执行长期负载测试时,我断电,测试被杀死。因此尝试使用“ nohup”但得到“没有这样的文件或目录”错误。

进入Jmeter bin目录后触发的以下命令

没有“ nohup”的命令(在我的连接处于活动状态之前,它可以正常工作)

JVM_ARGS="-Xms1024m -Xmx2048m" && export JVM_ARGS && ./jmeter -n -t /home/performance/LoadTesting/Portal-8HR.jmx -R 192.168.2.32:1099 -GTest_Name=LongDurationLoadTest -GTest_Triggered_By=LoadExecuter -Gtest_Id=200Con_8HR_Test01

命令尝试使用“ nohup”(不起作用)

JVM_ARGS="-Xms1024m -Xmx2048m" && export JVM_ARGS && nohup ./jmeter -n -t /home/performance/LoadTesting/Portal-8HR.jmx -R 192.168.2.32:1099 -GTest_Name=LongDurationLoadTest -GTest_Triggered_By=LoadExecuter -Gtest_Id=200Con_8HR_Test01 &

JVM_ARGS="-Xms1024m -Xmx2048m" && export JVM_ARGS && nohup "./jmeter -n -t /home/performance/LoadTesting/Portal-8HR.jmx -R 192.168.2.32:1099 -GTest_Name=LongDurationLoadTest -GTest_Triggered_By=LoadExecuter -Gtest_Id=200Con_8HR_Test01" &

JVM_ARGS="-Xms1024m -Xmx2048m" && export JVM_ARGS && nohup ./jmeter -n -t /home/performance/LoadTesting/Portal-8HR.jmx -R 192.168.2.32:1099 -GTest_Name=LongDurationLoadTest -GTest_Triggered_By=LoadExecuter -Gtest_Id=200Con_8HR_Test01 > /home/performance/RunTest/test2.txt 2>&1 &

请记住这些参数很重要,因为我有一个Grafana后端侦听器,该侦听器可以捕获所有具有所有结果的数据。

我也尝试过

nohup ./jmeter -n -t /home/performance/LoadTesting/Portal-8HR.jmx -R 192.168.2.32:1099 -GTest_Name=LongDurationLoadTest -GTest_Triggered_By=LoadExecuter -Gtest_Id=200Con_8HR_Test01 </dev/null >nohup.out 2>nohup.err &

但是得到,

Creating summariser <summary>
Created the tree successfully using /home/performance/LoadTesting/Portal-8HR.jmx
Configuring remote engine: 192.168.2.32:1099
Starting distributed test with remote engines: [192.168.2.32:1099] @ Wed May 06 12:32:30 UTC 2020 (1588768350878)
Error in rconfigure() method java.rmi.MarshalException: error marshalling arguments; nested exception is:
        java.io.NotSerializableException: org.apache.jmeter.JMeter$ListenToTest
Remote engines have been started:[]
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4446

使用主从模型运行负载模拟,同时使用nohup从命令行运行测试,并给出“无此类文件或目录”。因此,我有两个天蓝色的ubuntu vms(一个是master,另一个是...

jmeter nohup
1个回答
0
投票

我还没有完全了解您要实现的目标,正确的命令等同于:]]

nohup bash -c "JVM_ARGS=\"-Xms1024m -Xmx2048m\" && export JVM_ARGS && ./jmeter -n -t /home/performance/LoadTesting/Portal-8HR.jmx -R 192.168.2.32:1099 -GTest_Name=LongDurationLoadTest -GTest_Triggered_By=LoadExecuter -Gtest_Id=200Con_8HR_Test01 & ./jmeter -n -t /home/performance/LoadTesting/Portal-8HR.jmx -R 192.168.2.32:1099 -GTest_Name=LongDurationLoadTest -GTest_Triggered_By=LoadExecuter -Gtest_Id=200Con_8HR_Test01 & ./jmeter -n -t /home/performance/LoadTesting/Portal-8HR.jmx -R 192.168.2.32:1099 -GTest_Name=LongDurationLoadTest -GTest_Triggered_By=LoadExecuter -Gtest_Id=200Con_8HR_Test01" 2>&1 &
© www.soinside.com 2019 - 2024. All rights reserved.