zoukankan      html  css  js  c++  java
  • jmeter系列(12)_分布式运行_windows机器为master

    一台windows机器为master,2台linux机器为salve

    1、salve机器配置修改jmeter.properties配置:   一般都是修改了,压缩,上传salve服务器

      (1)server.rmi.ssl.disable=true

      (2)server_port=1099 只要是空闲的端口即可,不同的ip端口也可以不同

      (3)remote_hosts=10.18.4.2,这里设置为 salve机器的ip

           (对应这里的第(3)步中,remote_hosts也可以不设置,如果不设置的话,在启动的时候,用 sh jmeter-server -Djava.rmi.server.hostname=10.18.4.2)

    2、master机器配置修改,修改jmeter.properties配置,在windows环境上:

      (1)server.rmi.ssl.disable=true

      (2)remote_hosts=10.18.4.2:1099,10.18.4.3:1099

      (3)mode=Standard 启用

      

    3、启动 salve,执行  sh jmeter-server -Djava.rmi.server.hostname=10.18.4.2  ----带上ip   

        如果 remote_hostss设置了salve的ip,则直接  sh jmeter-server,如果需要后台运行 nohup   sh jmeter-server &

    出现如下,则正常启动:

    Created remote object: UnicastServerRef2 [liveRef: [endpoint:[10.18.4.2:44710](local),objID:[1fa5bd1d:17c2f9d6997:-7fff, -3929345483773564178]]]

    4、启动master,就直接在windows中jmeter的安装目录bin下面,直接执行 jmeter.bat就行了

    5、界面操作,启动salve机器,进行测试,可以选择单一salve机器,进行测试

     则,对应的salve机器上,就会有如下:一条开始记录,一条测试结束记录

    Starting the test on host 10.18.4.2:1099 @ Wed Sep 29 11:41:38 CST 2021 (1632886898968)
    Finished the test on host 10.18.4.2:1099 @ Wed Sep 29 11:41:49 CST 2021 (1632886909215)

    6、可以选择2个salve机器,同时进行测试,点击-远程启动所有  即可

    那么在2台salve机器上,分别有启动执行的记录:

    Starting the test on host 10.18.4.2:1099 @ Wed Sep 29 11:41:38 CST 2021 (1632886898968)
    Finished the test on host 10.18.4.2:1099 @ Wed Sep 29 11:41:49 CST 2021 (1632886909215)

    Starting the test on host 10.18.4.3:1099 @ Wed Sep 29 11:41:39 CST 2021 (1632886899477)
    Finished the test on host 10.18.4.3:1099 @ Wed Sep 29 11:41:49 CST 2021 (1632886909745)

        

    7、选择2个salve机器同时运行,那么对应的线程数,就是 要乘以2

       

     如果是windows中的master机器要在命令行中进行运行,则在cmd窗口中:

    jmeter.bat -n -R 10.18.4.2:1099,10.18.4.3:1099 -t D: oolsjmeter5apache-jmeter-5.2.1in est.jmx  -l D: est est_debug.jtl -e -o D: est eport

  • 相关阅读:
    攻防一体 暴力攻击
    新的亮眼的但不彻底的交互
    利用物联网或智能化区分产品
    Character Sets, Collation, Unicode :: utf8_unicode_ci vs utf8_general_ci
    容灾 RPO RTO
    微信找人代付 下单账号 支付账号
    微信公众号 openId 支付 php中file_get_contents与curl性能比较分析
    t
    accesstoken 中控服务器 并发刷新 加并发锁
    a
  • 原文地址:https://www.cnblogs.com/xiaofeng91/p/15352270.html
Copyright © 2011-2022 走看看