打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
jmeter压测学习25-服务器性能指标监控(PerfMon Metrics Collector)

前言

PerfMon服务器代理

PerfMon服务器代理的github地址https://github.com/undera/perfmon-agent,可以下载到安装包

ServerAgent-2.2.3.zip下载地址 https://github.com/undera/perfmon-agent/releases/download/2.2.3/ServerAgent-2.2.3.zip

下载完成后,上传到我们压测环境的服务器上,新建一个PerfMon文件夹,把安装包放到PerfMon目录
可以在windows上下载了上传到服务器上,也可以直接在服务器上wget下载

> wget https://github.com/undera/perfmon-agent/releases/download/2.2.3/ServerAgent-2.2.3.zip

下载后解压文件

[root@VM_0_2_centos ~]# mkdir Perfmon
[root@VM_0_2_centos ~]# cd Perfmon/
[root@VM_0_2_centos Perfmon]# wget https://github.com/undera/perfmon-agent/releases/download/2.2.3/ServerAgent-2.2.3.zip
[root@VM_0_2_centos Perfmon]# unzip ServerAgent-2.2.3.zip
[root@VM_0_2_centos Perfmon]# cd ServerAgent-2.2.3/
[root@VM_0_2_centos ServerAgent-2.2.3]# ll
total 176
-rw-rw-r-- 1 root root 10782 Aug 8 2017 CMDRunner.jar
drwxr-xr-x 2 root root 4096 Aug 8 2017 lib
-rw-rw-r-- 1 root root 85433 Aug 8 2017 LICENSE
-rw-rw-r-- 1 root root 67195 Aug 8 2017 ServerAgent.jar
-rwxr-xr-x 1 root root 63 Aug 8 2017 startAgent.bat
-rwxr-xr-x 1 root root 74 Aug 8 2017 startAgent.sh
[root@VM_0_2_centos ServerAgent-2.2.3]# ./startAgent.sh
INFO 2020-12-24 23:03:42.523 [kg.apc.p] (): Binding UDP to 4444
INFO 2020-12-24 23:03:43.602 [kg.apc.p] (): Binding TCP to 4444
INFO 2020-12-24 23:03:43.624 [kg.apc.p] (): JP@GC Agent v2.2.3 started

执行./startAgent.sh 启动服务,当看到如下提示,说明启动成功

[root@VM_0_2_centos ServerAgent-2.2.3]# ./startAgent.sh
INFO 2020-12-24 23:03:42.523 [kg.apc.p] (): Binding UDP to 4444
INFO 2020-12-24 23:03:43.602 [kg.apc.p] (): Binding TCP to 4444
INFO 2020-12-24 23:03:43.624 [kg.apc.p] (): JP@GC Agent v2.2.3 started

默认监听的UDP和TCP端口是4444, 服务正常启动后,在自己windows本地用telnet端口能不能连得通

> telnet ip 4444

我自己本地的windows电脑一直连不上这个4444端口,不知道为啥

如果4444端口连不上,可以换个端口重新启动,带上-udp-port 和 —tcp-port两个参数

[root@VM_0_2_centos ServerAgent-2.2.3]# ./startAgent.sh --udp-port 3456 --tcp-port 3456
INFO 2020-12-24 23:32:11.661 [kg.apc.p] (): Binding UDP to 3456
INFO 2020-12-24 23:32:12.696 [kg.apc.p] (): Binding TCP to 3456
INFO 2020-12-24 23:32:12.709 [kg.apc.p] (): JP@GC Agent v2.2.3 started

再重新telnet ip 3456 端口就能连上了

jmeter监听器jp@gc - PerfMon Metrics Collector

首先在插件管理Available Plugins里面搜索:PerfMon,看有没有安装,已经安装过的话,在Installed Plugins搜得到
关于插件管理,可以参考前面的文章https://www.cnblogs.com/yoyoketang/p/14180667.html

添加-监听器-jp@gc - PerfMon Metrics Collector

配置需要监控的性能指标,我这里配置了CPU和Memory

运行压测脚本就能看到服务器的性能指标了


2021年第六期《python接口自动化+测试开发》课程,1月9号开学(火热报名中!)

1月9-4月1820:30-22:30

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Jmeter ServerAgent
JMeter
jmeter服务器监控
CentOS 7 用户怎样安装 LNMP(Nginx+PHP+MySQL)
记一次解决被恶意植入挖矿程序kdevtmpfsi的过程
LINUX上的通用的springboot项目脚本(启动,停止,重启)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服