当前位置:网站首页>JMeter performance test: serveragent resource monitoring

JMeter performance test: serveragent resource monitoring

2022-07-05 14:51:00 Wu_ Candy

Today's topic is :Jmeter Performance test using ServerAgent Monitor server resources , Such as :CPU,Memory,Disks I/O,Network I/O And so on .

Yes linux When performing pressure test on the service of the server , The operation of the server can be observed by adding plug-ins , Instead of using top Order to see it in real time .

The specific operation steps are as follows :

1、 Resources to prepare

Under this website :https://jmeter-plugins.org/downloads/old/ Download the required plug-in resources :

JMeterPlugins-Extras.jar

JMeterPlugins-Standard.jar

ServerAgent-2.2.1

take JMeterPlugins-Extras.jar and JMeterPlugins-Standard.jar Put it in apache-jmeter-3.0\lib\ext Under the table of contents , take ServerAgent-2.2.1 Put it in linux The server opt Under the table of contents

2、 Environmental preparation

ServerAgent The default service port number is 4444, You need to set a firewall not to block this port :

vi /etc/sysconfig/iptables, In the port 22 Add... Below iptables -I INPUT -p tcp --dport 4444 -j ACCEPT // allow 4444 Port access

Then start the monitoring service in the server :

In the local test Normal access :

stay cmd Run in telnet ip 4444 Which is equivalent to browser Input in ip:4444

occasionally 4444 The port is occupied , At this time, you can switch the boot port access

Use the following command to change the default 4444 port

java -jar ./CMDRunner.jar --tool PerfMonAgent --udp-port 7777 --tcp-port 7777

alike ,7777 Port should also set firewall rules and use telnet Whether it can be accessed under local test , The test method is : stay cmd Run in telnet ip 4444 This is equivalent to entering... In the browser ip:4444, If run times telnet When not an internal or external command , You can query and solve it online by yourself , As shown in the figure below, the error :

3、 Listening to resources

take jar Put the bag in lib Inferior posterior ,jmeter There will be more monitoring plug-ins for your listeners , Select Add , As shown in the screenshot below :

for instance : Now there's a need , There are... Per second on average 50 Users log in , Need to observe 2 Resource usage of the server within hours

Add details that need to monitor resources , Such as :CPU,Memory etc. , As shown in the screenshot below :

The result is : The resource fluctuation curve shown on the right side of the above screenshot shows the state change of the corresponding resources .

Be careful :linux The agent service under the tested server must be started successfully ;

原网站

版权声明
本文为[Wu_ Candy]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207051444213273.html