当前位置:网站首页>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被测服务器下的代理服务一定要是启动成功状态;
边栏推荐
- webRTC SDP mslabel lable
- Countermeasures of enterprise supply chain management system in UCA Era
- leetcode:881. 救生艇
- World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection
- Detailed explanation of usememo, memo, useref and other relevant hooks
- Topology visual drawing engine
- Drive brushless DC motor based on Ti drv10970
- PHP - fatal error: allowed memory size of 314572800 bytes exhausted
- Is it OK to open the securities account on the excavation finance? Is it safe?
- Intelligent supply chain collaboration system solution for daily chemical products industry: digital intelligent SCM supply chain, which is the "acceleration" of enterprise transformation
猜你喜欢
面试突击62:group by 有哪些注意事项?
Mongdb learning notes
Implement a blog system -- using template engine technology
Online electronic component purchasing Mall: break the problem of information asymmetry in the purchasing process, and enable enterprises to effectively coordinate management
直播预告|如何借助自动化工具落地DevOps(文末福利)
Intelligent supply chain collaboration system solution for daily chemical products industry: digital intelligent SCM supply chain, which is the "acceleration" of enterprise transformation
ASP.NET大型外卖订餐系统源码 (PC版+手机版+商户版)
freesurfer运行完recon-all怎么快速查看有没有报错?——核心命令tail重定向
How can non-technical departments participate in Devops?
周大福践行「百周年承诺」,真诚服务推动绿色环保
随机推荐
Topology visual drawing engine
LeetCode_ 3 (longest substring without repeated characters)
mysql8.0JSON_ Instructions for using contains
Un week - end heureux
ASP.NET大型外卖订餐系统源码 (PC版+手机版+商户版)
SaaS multi tenant solution for FMCG industry to build digital marketing competitiveness of the whole industry chain
Matrix chain multiplication dynamic programming example
PyTorch二分类时BCELoss,CrossEntropyLoss,Sigmoid等的选择和使用
周大福践行「百周年承诺」,真诚服务推动绿色环保
外盘入金都不是对公转吗,那怎么保障安全?
Handwriting promise and async await
Change multiple file names with one click
Thymeleaf th:with use of local variables
Section - left closed right open
maxcompute有没有能查询 表当前存储容量的大小(kb) 的sql?
dynamic programming
APR protocol and defense
LeetCode_ 67 (binary sum)
【学习笔记】图的连通性与回路
Thymeleaf common functions