Clustered Linux environment to build Jmeter

First, why should set up a cluster?

    The main reason is no way to meet single server system pressure, to ease the pressure by multiple servers.

Two, Jmeter distributed principle 

  1.JMeter distributed test, choose to do scheduling server node, other nodes as execution node, another node through management scheduling node;

  2. start the service, the scheduling server will execute the script sent to each node (script execution will be sent to the node, but the data is not sent), the node is executed to get the script started executing the command;

  3. After the end of each execution result back to the node performs scheduling nodes, schedule summary node data;

  Schematic:

 

Third, build environment

  1, each node installation Jmeter.

  2, into the Jmeter scheduling node (Jmeter Controller) bin directory, edit meter.properties

jmeter.properties file search key remote_hosts, to DNT Slave node IP, the default port is Jmeter Server 1099, if you need to modify the comment to be modified to cancel server_port

Note: 
    If you want Controller node is also involved in pressure, remote_host you need to add the machine address

  3. Edit Salve node jmeter-server document, the host server's IP set to a fixed value

 

 

   4. Start all participating requesting node jmeter-server, go to the bin directory to start

./jmeter-server

Note: 

  If your Controller nodes involved in the request, this time jmeter -server also need to start

 

   At this point the Jmeter distributed cluster completed structures, and the rest is used to run the test script

  5. Run the test script

  •  Start all Slave nodes (add parameter -r)
jmeter -n -t osg-uus Service Interface certain ping -l Result .jmx / . 17 - . 1 - 200 is - . 1 /testResult.jtl -e -o Result / . 17 - . 1 - 200 is - . 1 -R & lt
  • Start the specified Slave node
jmeter -n -t osg-uus Service Interface certain ping -l Result .jmx / . 17 - . 1 - 200 is - . 1 /testResult.jtl -e -o Result / . 17 - . 1 - 200 is - . 1 -R & lt 172.29 . 64.11

  6.Jmeter Commands

parameter Explanation
-n Non-GUI mode 
-t Run JMeter test script file
-l Record results specified file
-r Start all Slave nodes
-R Specifies the start Slave node

 Fourth, met pit

  Since the process of measuring the pressure due to the need to change the network environment, but the map is still the old domain name server address, can not be connected during a remote request, leading to long analysis, it is best to add the hostname mapping in the hosts file to avoid such errors

其实很早想记录下Jmeter集群搭建,也不知道什么理由一直拖到了现在,疫情期间在家办公,也不知道啥时候上班啥时候下班,趁着孩子睡觉,记录下。

Guess you like

Origin www.cnblogs.com/mengyu/p/12343881.html