当前位置:网站首页>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被测服务器下的代理服务一定要是启动成功状态;
边栏推荐
- Differences between IPv6 and IPv4 three departments including the office of network information technology promote IPv6 scale deployment
- Implement a blog system -- using template engine technology
- Two Bi development, more than 3000 reports? How to do it?
- APR protocol and defense
- How to protect user privacy without password authentication?
- How can non-technical departments participate in Devops?
- 开挖财上的证券账户可以吗?安全吗?
- PostgreSQL 13 installation
- PyTorch二分类时BCELoss,CrossEntropyLoss,Sigmoid等的选择和使用
- Section - left closed right open
猜你喜欢

APR protocol and defense

如何将电脑复制的内容粘贴进MobaXterm?如何复制粘贴

Thymeleaf th:classappend attribute append th:styleappend style append th:data- custom attribute

家用电器行业商业供应链协同平台解决方案:供应链系统管理精益化,助推企业智造升级

PHP - fatal error: allowed memory size of 314572800 bytes exhausted

Photoshop插件-动作相关概念-ActionList-ActionDescriptor-ActionList-动作执行加载调用删除-PS插件开发

leetcode:881. 救生艇

Sharing the 12 most commonly used regular expressions can solve most of your problems

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

Opengauss database source code analysis series articles -- detailed explanation of dense equivalent query technology (Part 2)
随机推荐
CPU设计相关笔记
maxcompute有没有能查询 表当前存储容量的大小(kb) 的sql?
Is it OK to open the securities account on the excavation finance? Is it safe?
【C 题集】of Ⅷ
Share 20 strange JS expressions and see how many correct answers you can get
[C question set] of Ⅷ
申请代码签名证书时如何选择合适的证书品牌?
一键更改多个文件名字
PHP - fatal error: allowed memory size of 314572800 bytes exhausted
js亮瞎你眼的日期选择器
我这边同时采集多个oracle表,采集一会以后,会报oracle的oga内存超出,大家有没有遇到的?
Is the securities account given by the head teacher of qiniu school safe? Can I open an account?
729. 我的日程安排表 I :「模拟」&「线段树(动态开点)」&「分块 + 位运算(分桶)」
Photoshop插件-动作相关概念-ActionList-ActionDescriptor-ActionList-动作执行加载调用删除-PS插件开发
面试突击62:group by 有哪些注意事项?
选择排序和冒泡排序
How to solve the problem of garbled code when installing dependency through NPM or yarn
Under the crisis of enterprise development, is digital transformation the future savior of enterprises
ASP. Net large takeout ordering system source code (PC version + mobile version + merchant version)
手写promise与async await