surroundings
ubuntu16.04
jmeter5.1.1 (try to use the new version)
Configuration
principle:
Slaver (execution unit) configuration
- Installation jmeter, the official website to download and extract the extracts (not described in detail here)
- Modify the configuration file /apache-jmeter-5.1.1/bin/jmeter.properties
- Modify the native host file
sudo vim /etc/hosts # 修改当前IP为非回环地址,127.0.0.1即为回环地址,改为网段IP地址
4. Start jmeter-server service
cd ~/apache-jmeter-5.1.1/bin
./jmeter-server
You can modify the startup successful (according to the relevant error if the error modification), do not turn off (or nohup running in the background), once a shutdown control machine can not find the machine to perform service jmeter
master configuration
Control machine can also be configured to perform in accordance with machine again
jmeter distributed by jmeter-server management, the control unit also to ensure services turned on, but control only needs to ensure jmeter-server service to start as you normally would, no running in the background
- Modify the configuration file /apache-jmeter-5.1.1/bin/jmeter.properties
first jmeter This machine control service, an IP address needs to be changed to localhost, behind the IP address for the execution machine
jmeter-server default port 1099 , to modify the following modification to the port number (the execution machine is the same)
Run the script
cd ~//apache-jmeter-5.1.1/bin
.jmeter.sh -n -t test.jmx -r -l test.jtl
./jmeter.sh -n -t test.jmx -R xxx.xxx.xxx.xxx -l test.jtl
Reference parameters:
t: Specifies the test scripts
R: specify how many agent to start and participate in the test, separated by
r: agent on behalf of all the start and participate in testing
l: generate test results document