12.Jmeter 快速入门教程 -- 监控被测资源

写在前面的话, 作者认为jmeter的监控被测服务器资源只是基本可用, 还好习惯了linux的各种命令和工具,所以也基本不用担心什么了.但是有了图形化的监控, 也方便给领导出报告. 怎么说也是不错的.  

在准备正式开始性能测试时,发现,原有的服务器端性能监控的方案,无法通过非GUI模式保存性能数据,而且所记录性能数据比较单一,只有内存的使用情况;所以尝试其他方法;

找到的方法

http://jmeter-plugins.org/wiki/PerfMonAgent/?utm_source=jpgc&;utm_medium=link&utm_campaign=PerfMonAgent

是jmeter官方发布的一个专门作用做web服务器性能监控的工具,包括两部分,需要下载

JMeterPlugins-Standard-1.1.1.zip,

安装到Jmeter之后就会多一个监视器

7e3e6709c93d70cfb565afccf9d

其次需要下载 ServerAgent-2.2.1.zip

这个是服务器代理,在需要监控的服务器上运行用来采集并向测试机发送服务器信息;

使用方法

$ ./startAgent.sh --udp-port 0 --tcp-port 3450
INFO    2011-11-25 19:02:14.315 [kg.apc.p] (): Binding TCP to 3450

下面是官网的简介 jmeter很好很强大呀

Servers Performance Monitoringsince 0.3.0

Introduction

During a load test, it is important to know the health of the servers loaded. It is also nice to see if you are targeting a cluster if the load is correctly dispatched. To address this, the plugin package now supports server monitoring! Using it, you can monitor CPU, Memory, Swap, Disks I/O and Networks I/O on almost all platforms!

Here is how the plugin looks like. It shows the CPU usage of 4 servers involved in the load test:

95eef01f3a292df58607a9d4bd3

Metrics collected

Since version 0.5.0 the Server Agent tool supports collecting over 75 system metrics. See full list.

How it worksConcept

JMeter cannot retrieve by default server metrics except Tomcat ones. To overcome this situation, we have developed a server agent which will get performance data for JMeter. The agent uses the SIGAR open source library. It is composed of a Java common part and native libraries per OS.

e7cd7b899e510fb3bb0a7356d83

Installation

Server Agent tool detailed description is placed here.

UsageGUI Mode

In GUI mode, just add the listener, define servers and metric types to monitor, ensure the agent is running at remote server and is not blocked by a firewall, then run the test. The values will be displayed at real time chart.

Non GUI Mode

If you run JMeter in non GUI mode and want to save monitoring data to file, just configure result file saving in GUI as you do with other listeners. After running the test you may load saved file into GUI and see the values timeline.

posted @ 2018-08-09 17:08  张飞博客  阅读(177)  评论(0编辑  收藏  举报