当前位置:网站首页>Jmeter性能测试:ServerAgent资源监控
Jmeter性能测试:ServerAgent资源监控
2022-07-05 14:44:00 【Wu_Candy】
今天分享的主题内容是:Jmeter性能测试时使用ServerAgent对服务器资源进行监控,如:CPU,Memory,Disks I/O,Network I/O等服务器资源。
对linux服务器的服务进行压测时,服务器的运行情况可以通过添加插件来观察,而不用使用top命令实时的去看。
具体操作步骤如下:
1、资源准备
在这个网址下:https://jmeter-plugins.org/downloads/old/下载所需插件资源:
JMeterPlugins-Extras.jar
JMeterPlugins-Standard.jar
ServerAgent-2.2.1
将JMeterPlugins-Extras.jar和JMeterPlugins-Standard.jar放到apache-jmeter-3.0\lib\ext目录下,将ServerAgent-2.2.1放到linux服务器opt目录下
2、环境准备
ServerAgent服务端口号默认为4444,需要设置防火墙对此端口不拦截:
vi /etc/sysconfig/iptables,在端口22下面添加 iptables -I INPUT -p tcp --dport 4444 -j ACCEPT //允许4444端口访问
然后在服务器中启动监控服务:
在本地测试是否正常访问:
在cmd中运行telnet ip 4444也就等同于在浏览器中输入ip:4444
有时候4444端口被占用了,这时候可以切换启动端口访问
使用以下命令可以改变默认的4444端口
java -jar ./CMDRunner.jar --tool PerfMonAgent --udp-port 7777 --tcp-port 7777
同样的,7777端口也要设置防火墙规则以及使用telnet本地测试下是否可以访问,测试方法为:在cmd中运行telnet ip 4444也就等同于在浏览器中输入ip:4444,如果运行时报telnet不是内部或外部命令时,可自行网上查询解决,如下图所示错误:
3、监听资源
将jar包放到lib下后,jmeter的监听器就会多出一些监控插件,选择添加即可,如下截图所示:
举个例子:现在有个需求,平均每秒有50个用户登录,需要观察2小时内服务器的资源使用情况
添加需要监控资源的细项,如:CPU,Memory等,如下截图所示:
查看结果为:上述截图中右侧展示的资源波动曲线图为对应资源的状态变化。
注意点:linux被测服务器下的代理服务一定要是启动成功状态;
边栏推荐
- Two Bi development, more than 3000 reports? How to do it?
- 黑马程序员-软件测试-10阶段2-linux和数据库-44-57为什么学习数据库,数据库分类关系型数据库的说明Navicat操作数据的说明,Navicat操作数据库连接说明,Navicat的基本使用,
- 03_ Dataimport of Solr
- Implement a blog system -- using template engine technology
- 想进阿里必须啃透的12道MySQL面试题
- World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection
- 美国费城发生“安全事故” 2名警察遭枪杀
- Chow Tai Fook fulfills the "centenary commitment" and sincerely serves to promote green environmental protection
- LeetCode_ 2 (add two numbers)
- Principle and performance analysis of lepton lossless compression
猜你喜欢
周大福践行「百周年承诺」,真诚服务推动绿色环保
【leetcode周赛总结】LeetCode第 81 场双周赛(6.25)
PHP - fatal error: allowed memory size of 314572800 bytes exhausted
Mongdb learning notes
Thymeleaf th:classappend attribute append th:styleappend style append th:data- custom attribute
MongDB学习笔记
Penetration testing methodology
日化用品行业智能供应链协同系统解决方案:数智化SCM供应链,为企业转型“加速度”
leetcode:881. 救生艇
Opengauss database source code analysis series articles -- detailed explanation of dense equivalent query technology (Part 2)
随机推荐
ASP. Net large takeout ordering system source code (PC version + mobile version + merchant version)
Type declaration of all DOM elements in TS
在Pytorch中使用Tensorboard可视化训练过程
How to open an account of qiniu securities? Is it safe to open an account?
Talking about how dataset and dataloader call when loading data__ getitem__ () function
周大福践行「百周年承诺」,真诚服务推动绿色环保
be careful! Software supply chain security challenges continue to escalate
Security analysis of Web Architecture
APR protocol and defense
[learning notes] stage test 1
Intelligent supply chain collaboration system solution for daily chemical products industry: digital intelligent SCM supply chain, which is the "acceleration" of enterprise transformation
做自媒体视频二次剪辑,怎样剪辑不算侵权
Webrtc learning (II)
Niuke: intercepting missiles
面试突击62:group by 有哪些注意事项?
Matrix chain multiplication dynamic programming example
[12 classic written questions of array and advanced pointer] these questions meet all your illusions about array and pointer, come on!
Principle and performance analysis of lepton lossless compression
webRTC SDP mslabel lable
Penetration testing methodology