JMeter 官方解读:http://jmeter.apache.org/usermanual/jmeter_distributed_testing_step_by_step.pdf
**********************
Step-by-Step
1. On the slave systems, go to jmeter/bin directory and execute jmeter-server.bat (jmeter-server on
unix).
On windows, you should see a dos window appear with “jre\[version]\bin\rmiregistry.exe”.
If this doesn't happen, it means either the environment settings are not right, or there are
multiple JRE installed on the system. Note: [version] would be the jre version installed on the
system.
1. Open jmeter-server.bat in a text editor
2. go to line 44 and find “:setCP”
3. edit “START rmiregistry” to the full path. Example: “START C:\
2. On master system acting as the console, open windows explorer and go to jmeter/bin directory
3. open jmeter.properties in a text editor
4. edit the line “remote_hosts=127.0.0.1”
5. add the IP address. For example, if I have jmeter server running on 192.168.0.10, 11, 12, 13, and
14, the entry would like like this:
remote_hosts=192.168.0.10,192.168.0.11,192.168.0.12,192.168.0.13,192.168.0.14
6. Start jmeter.
7. Open the test plan you want to use
**************************
Jmeter - Linux 下面执行jmeter-server的时候出现:An error occurred: Cannot start. localhost is a loopback address.错误
[root@localhost bin]# ./jmeter-server
Created remote object: UnicastServerRef [liveRef: [endpoint:[127.0.0.1:39150](local),objID:[-3126fe29:14300b1102e:-7fff, -4078314045196249121]]]An error occurred: Cannot start. localhost is a loopback address.
解决方法如下: In latest version, you can run your script with:指定本地IP
./jmeter-server -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx
[root@localhost bin]# ./jmeter-server -Djava.rmi.server.hostname=192.168.237.129
Created remote object: UnicastServerRef [liveRef: [endpoint:[192.168.237.129:47673](local),objID:[-7946c75b:14300b3330a:-7fff, -616947588795269019]]]
这样就可以在 本地的Master里面看到远程启动了:
******************************************************************************************
Linux下面用nohup命令**** + &,后台执行,启用server
***********************************************************************************
[root@localhost bin]# nohup ./jmeter-server -Djava.rmi.server.hostname=192.168.237.129 &
[1] 11124***********************************************************************************
下面命令查看 jmeter,确定jmeter启动成功~~
***********************************************************************************
[root@localhost bin]# ps axu | grep jmeter