實現Jmeter如何遠程監控服務器node
1.Jmeter 須要安裝插件PerfMon Metrics Collector. 能夠直接下載Jmeter的插件管理器,之後想安裝哪一個插件就很方便linux
下載插件管理器地址:https://jmeter-plugins.org/downloads/all/windows
下載完成後,把jar包放在lib/ext目錄下,而後重啓Jmeter,會在菜單-選項下多一個 Plugins Manager菜單,打開便可對插件進行安裝、升級。服務器
2.下載serverAgent開啓遠程服務插件
serverAgent 在windows/linux系統上解壓線程
開啓服務,默認端口號都是4444:3d
windows執行serverAgent.batserver
INFO 2018-04-24 14:47:49.313 [kg.apc.p] (): Binding UDP to 4444
INFO 2018-04-24 14:47:50.312 [kg.apc.p] (): Binding TCP to 4444
INFO 2018-04-24 14:47:50.318 [kg.apc.p] (): JP@GC Agent v2.2.3 started
INFO 2018-04-24 14:48:26.749 [kg.apc.p] (): Accepting new TCP connectionblog
執行成功!io
linux執行./serverAgent.sh
[root@node1 ServerAgent-2.2.3]# ./startAgent.sh
INFO 2018-04-24 14:46:41.349 [kg.apc.p] (): Binding UDP to 4444
INFO 2018-04-24 14:46:42.369 [kg.apc.p] (): Binding TCP to 4444
INFO 2018-04-24 14:46:42.372 [kg.apc.p] (): JP@GC Agent v2.2.3 started
INFO 2018-04-24 14:46:49.386 [kg.apc.p] (): Accepting new TCP connection
執行成功!
3.Jmeter線程組右鍵-》添加監聽器-》PerfMon Metrics Collector
4.點擊add row,填寫須要監控的服務器地址,以及須要監控服務器的指標。以下圖
5.查看監控結果,是否是很炫,哈哈!