当前位置:网站首页>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被测服务器下的代理服务一定要是启动成功状态;
边栏推荐
- How to choose the appropriate certificate brand when applying for code signing certificate?
- ASP.NET大型外卖订餐系统源码 (PC版+手机版+商户版)
- Thymeleaf th:with局部变量的使用
- anaconda使用中科大源
- LeetCode_ 2 (add two numbers)
- js亮瞎你眼的日期选择器
- Topology visual drawing engine
- freesurfer运行完recon-all怎么快速查看有没有报错?——核心命令tail重定向
- Principle and performance analysis of lepton lossless compression
- PyTorch二分类时BCELoss,CrossEntropyLoss,Sigmoid等的选择和使用
猜你喜欢

黑马程序员-软件测试-10阶段2-linux和数据库-44-57为什么学习数据库,数据库分类关系型数据库的说明Navicat操作数据的说明,Navicat操作数据库连接说明,Navicat的基本使用,

Interview shock 62: what are the precautions for group by?

Topology visual drawing engine
![[learning notes] stage test 1](/img/22/ad16375d8d1510c2ec75c56403a8bf.png)
[learning notes] stage test 1

Security analysis of Web Architecture

Mongdb learning notes

CYCA少儿形体礼仪 宁波市培训成果考核圆满落幕

网上电子元器件采购商城:打破采购环节信息不对称难题,赋能企业高效协同管理
![[12 classic written questions of array and advanced pointer] these questions meet all your illusions about array and pointer, come on!](/img/d2/c0a19c85b2011ecd07c9944d996c4d.png)
[12 classic written questions of array and advanced pointer] these questions meet all your illusions about array and pointer, come on!

Two Bi development, more than 3000 reports? How to do it?
随机推荐
STM32+BH1750光敏传感器获取光照强度
快消品行业SaaS多租户解决方案,构建全产业链数字化营销竞争力
maxcompute有没有能查询 表当前存储容量的大小(kb) 的sql?
Opengauss database source code analysis series articles -- detailed explanation of dense equivalent query technology (Part 2)
Change multiple file names with one click
Webrtc learning (II)
The function of qualifier in C language
Microframe technology won the "cloud tripod Award" at the global Cloud Computing Conference!
How to choose the appropriate certificate brand when applying for code signing certificate?
实现一个博客系统----使用模板引擎技术
be careful! Software supply chain security challenges continue to escalate
Penetration testing methodology
729. My schedule I: "simulation" & "line segment tree (dynamic open point) &" block + bit operation (bucket Division) "
日化用品行业智能供应链协同系统解决方案:数智化SCM供应链,为企业转型“加速度”
APR protocol and defense
LeetCode_ 2 (add two numbers)
FR练习题目---综合题
How to open an account of qiniu securities? Is it safe to open an account?
CPU设计相关笔记
Intelligent supply chain collaboration system solution for daily chemical products industry: digital intelligent SCM supply chain, which is the "acceleration" of enterprise transformation