美文网首页
二、linux环境分布式压测环境部署

二、linux环境分布式压测环境部署

作者: Show嘿嘿 | 来源:发表于2019-07-11 21:39 被阅读0次

    接上文一、Jmeter安装
    被压测机器:10.8.62.9(实际测试需要同网段,此处只是学习需要,无所谓。)
    master:10.8.229.22(jmeter调度机器)
    slaves:10.8.229.21,10.8.229.20,10.8.229.19(jmeter压力机)

    • mater机器配置:

      remote_hosts=10.8.229.19:1099,10.8.229.20:1099,10.8.229.21:1099 
      
    • slaves机器配置:

      server.rmi.localport=1099
      
    • 启动slaves的jmeter-server

      /path/apache-jmeter-3.2/bin/jmeter-server -Djava.rmi.server.hostname=10.8.229.21
      /path/apache-jmeter-3.2/bin/jmeter-server -Djava.rmi.server.hostname=10.8.229.20
      /path/apache-jmeter-3.2/bin/jmeter-server -Djava.rmi.server.hostname=10.8.229.19
      
    • 执行jmeter脚本

      jmeter -n -t test3.jmx -R 10.8.229.21:1099,10.8.229.20:1099,10.8.229.19:1099 -l log.jtl
      
      [root@localhost tmp]# jmeter -n -t test3.jmx -R 10.8.229.21:1099,10.8.229.20:1099,10.8.229.19:1099 -l log.jtl
      Creating summariser <summary>
      Created the tree successfully using test3.jmx
      Configuring remote engine: 10.8.229.21:1099
      Configuring remote engine: 10.8.229.20:1099
      Configuring remote engine: 10.8.229.19:1099
      Starting remote engines
      Starting the test @ Fri Jul 05 18:05:43 CST 2019 (1562321143136)
      Remote engines have been started
      Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
      summary =      3 in 00:00:00 =   21.6/s Avg:     2 Min:     2 Max:     3 Err:     0 (0.00%)
      Tidying up remote @ Fri Jul 05 18:05:44 CST 2019 (1562321144032)
      ... end of run
      
      
    • 查看被压组件的访问日志

      10.8.229.21 - - [05/Jul/2019:17:55:34 +0800] "GET http://aaa.aa.com/wstest/index.html HTTP/1.1" 0 "-" 201
      10.8.229.19 - - [05/Jul/2019:17:55:34 +0800] "GET http://aaa.aa.com/wstest/index.html HTTP/1.1" 0 "-" 201
      10.8.229.20 - - [05/Jul/2019:17:55:34 +0800] "GET http://aaa.aa.com/wstest/index.html HTTP/1.1" 0 "-" 201
      
    • test3.jmx


      20190705-1.png 20190705-2.png 20190705-3.png

    相关文章

      网友评论

          本文标题:二、linux环境分布式压测环境部署

          本文链接:https://www.haomeiwen.com/subject/rvpjkctx.html