1、Jmeter4.0分布式壓測准備工作
簡介:講解Linux服務器上jmeter進行分布式壓測的相關准備工作
1、壓測注意事項
the firewalls on the systems are turned off or correct ports are opened.
系統上的防火牆被關閉或正確的端口被打開。
all the clients are on the same subnet.
所有的客戶端都在同一個子網上。
the server is in the same subnet, if 192.x.x.x or 10.x.x.x IP addresses are used. If the server doesn't use 192.xx or 10.xx IP address, there shouldn't be any problems.
如果使用192.x.x.x或10.x.x.x IP地址,則服務器位於同一子網中。 如果服務器不使用192.xx或10.xx IP地址,則不應該有任何問題。
Make sure JMeter can access the server.
確保JMeter可以訪問服務器。
Make sure you use the same version of JMeter and Java on all the systems. Mixing versions will not work correctly.
確保在所有系統上使用相同版本的JMeter和Java。 混合版本將無法正常工作。
You have setup SSL for RMI or disabled it.
您已為RMI設置SSL或將其禁用。
官網地址 http://jmeter.apache.org/usermanual/jmeter_distributed_testing_step_by_step.html
壓測注意事項:一定要用內網IP,不用用公網IP,用ping去檢查
2、專業名字
master:司令
slave:奴隸
target:目標
地址:http://jmeter.apache.org/images/screenshots/distributed-names.svg
地址:http://jmeter.apache.org/images/screenshots/distributed-jmeter.svg
遠程拷貝(內網地址):
scp -r /usr/local/software/jdk-8u141-linux-x64.tar.gz root@172.18.230.233:/usr/local/software
scp -r /usr/local/software/jmeter/apache-jmeter-4.0.tgz root@172.18.230.233:/usr/local/software/jmeter
啟動
./jmeter-server 或者 nohup ./jmeter-server &
檢查啟動是否成功
ps -ef|grep jmeter-server
ps aux|grep jmeter-server
2、阿里雲jmeter壓測常見問題處理
簡介:講解阿里雲上安裝jmeter常見問題的處理,安裝遇到的問題等等
(備注:內容較多,放在筆記最下方)
3、Jmeter4.0分布式壓測實戰
簡介:Jmeter分布式壓測實戰,壓測接口
1、關注CPU和內存使用
本地非GUI分布式壓測 -r
jmeter -n -t /Users/jack/Desktop/remote.jmx -r -l /Users/jack/Desktop/jtl/result.jtl -e -o /Users/jack/Desktop/result
壓測結果
./jmeter -n -t /Users/jack/Desktop/remote.jmx -r -l /Users/jack/Desktop/jtl/result.jtl -e -o /Users/jack/Desktop/result
Creating summariser <summary>
Created the tree successfully using /Users/jack/Desktop/remote.jmx
Configuring remote engine: 172.20.10.3:8899
Using local port: 8899
Configuring remote engine: 172.20.10.11:8899
Starting remote engines
Starting the test @ Thu Mar 29 23:21:13 CST 2018 (1522336873931)
Remote engines have been started
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
summary = 4 in 00:00:22 = 0.2/s Avg: 5582 Min: 94 Max: 21006 Err: 1 (25.00%)
Tidying up remote @ Thu Mar 29 23:21:36 CST 2018 (1522336896842)
... end of run
2、壓測修改master節點信息
jemeter.properties 值是slave機器的ip+端口號,如果有多個,用逗號分隔
remote_hosts=192.168.0.102:8899,192.168.0.101:8899
server.rmi.ssl.disable=true (前面有說到)
3、啟動slave機器,注意要同個網段,ip地址用內網ip
./jmeter-server
Using local port: 8899
Created remote object: UnicastServerRef2 [liveRef: [endpoint:[192.168.0.102:8899](local),objID:[3a585a4d:162724586ab:-7fff, 3963132813614033916]]]
相關資料:
https://www.cnblogs.com/Fine-Chan/p/6233823.html
https://blog.csdn.net/liujingqiu/article/details/52635289
https://www.cnblogs.com/puresoul/p/4844539.html