当前位置:网站首页>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被测服务器下的代理服务一定要是启动成功状态;
边栏推荐
- CyCa children's physical etiquette Ningbo training results assessment came to a successful conclusion
- Thymeleaf th:with局部变量的使用
- Thymeleaf th:with use of local variables
- Topology可视化绘图引擎
- The function of qualifier in C language
- Intelligent supply chain collaboration system solution for daily chemical products industry: digital intelligent SCM supply chain, which is the "acceleration" of enterprise transformation
- Thymeleaf 模板的创建与使用
- 危机重重下的企业发展,数字化转型到底是不是企业未来救星
- PostgreSQL 13 installation
- webRTC SDP mslabel lable
猜你喜欢

CPU设计相关笔记

FR练习题目---简单题

【华为机试真题详解】字符统计及重排

LeetCode_ 2 (add two numbers)

申请代码签名证书时如何选择合适的证书品牌?

Countermeasures of enterprise supply chain management system in UCA Era

How to choose the appropriate certificate brand when applying for code signing certificate?

World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection

Topology可视化绘图引擎

How to protect user privacy without password authentication?
随机推荐
Share 20 strange JS expressions and see how many correct answers you can get
World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection
基于TI DRV10970驱动直流无刷电机
729. 我的日程安排表 I :「模拟」&「线段树(动态开点)」&「分块 + 位运算(分桶)」
PyTorch二分类时BCELoss,CrossEntropyLoss,Sigmoid等的选择和使用
【招聘岗位】基础设施软件开发人员
Section - left closed right open
Thymeleaf th:classappend attribute append th:styleappend style append th:data- custom attribute
Security analysis of Web Architecture
Photoshop plug-in action related concepts actionlist actiondescriptor actionlist action execution load call delete PS plug-in development
Photoshop插件-动作相关概念-ActionList-ActionDescriptor-ActionList-动作执行加载调用删除-PS插件开发
Talking about how dataset and dataloader call when loading data__ getitem__ () function
CPU设计实战-第四章实践任务二用阻塞技术解决相关引发的冲突
Thymeleaf 常用函數
实现一个博客系统----使用模板引擎技术
How to protect user privacy without password authentication?
Run faster with go: use golang to serve machine learning
乌卡时代下,企业供应链管理体系的应对策略
Is the securities account given by the head teacher of qiniu school safe? Can I open an account?
美国费城发生“安全事故” 2名警察遭枪杀