Jmeter set distributed (ubuntu)

surroundings

ubuntu16.04
jmeter5.1.1 (try to use the new version)

Configuration

principle:
Here Insert Picture Description

Slaver (execution unit) configuration

  1. Installation jmeter, the official website to download and extract the extracts (not described in detail here)
  2. Modify the configuration file /apache-jmeter-5.1.1/bin/jmeter.properties
    Here Insert Picture Description
  3. Modify the native host file
sudo vim /etc/hosts  # 修改当前IP为非回环地址,127.0.0.1即为回环地址,改为网段IP地址

Here Insert Picture Description
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
Here Insert Picture Description

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

  1. 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)
    Here Insert Picture Description

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

Published 77 original articles · won praise 19 · views 20000 +

Guess you like

Origin blog.csdn.net/baidu_36943075/article/details/102587488