JMeter Monitoring server-side performance

Source: Internet
Author: User
Tags apc

JMeter is a stress test tool that we can use to monitor server resource usage.
JMeter normal self-bring can monitor service resource usage through Tomcat's/manager/status. This situation can only monitor the resource usage portion of Tomcat support.

This article mainly discusses how to monitor the server CPU, memory, disk, network and other related resources through the JMeter plug-in.
JMeter Plugin URL: http://jmeter-plugins.org/
Perf Mon Plugin http://jmeter-plugins.org/wiki/PerfMon/

1 service itself: Concurrency response time QPS

2 Server Resource Usage: CPU memory I/O disk, etc.

JMeter Plugins plug-in can realize the "two" monitoring, the specific operation steps are as follows (the main record of my practice process):

Description: My jmeter version is 2.13

Download Plugin

First go to URL http://jmeter-plugins.org/downloads/all/Download resources
Serveragent-2.2.1.zip
Jmeterplugins-standard-1.3.1.zip
Jmeterplugins-extras-1.3.1.zip

Where Jmeterplugins-standard and Jmeterplugins-extras are clients, ServerAgent is the server.

Second, the configuration
Place the Jmeterplugins-standard.jar files in the Lib\ext directory in the Jmeterplugins-standard-1.3.1.zip in the Apache-jmeter-2.13\lib\ext directory.
Place the Jmeterplugins-extras.jar file in the Lib\ext directory in the Jmeterplugins-extras-1.3.1.zip in the Apache-jmeter-2.13\lib\ext directory.
Place the ServerAgent-2.2.1 in the server you want to monitor for use.

Unzip the client's two files, enter its path Jmeterplugins-extras (standard) -1.3.1\lib\ext, copy Jmeterplugins-extras.jar ( Jmeterplugins-standard.jar) Two files, put in the Lib/ext folder of the JMeter client, open JMeter, you can see Permon Metrics Collector in the listener, the client configuration is successful.

Third, monitoring
1) apache-jmeter-2.12\bin\jmeter.bat start JMeter
After the normal startup success, the following:

3 Upload Serveragent-2.2.1.jar to the tested server, unzip, enter directory, Windows environment, double-click Serveragent.bat Boot, Linux environment serveragent.sh start, default to 4444 port, the following occurs Service-side success :

Four test use Cases

1 ServerAgent-initiated checksum

A on the laptop turn on Telnet monitoring (Control Panel-Programs-turn Windows features on or off-telnet client check open)

b cmd into the Command box, enter the following:

Telnet Yourip  4444   #连接ServerAgenttest                  #发送test进行测试exit                  #退出, i.e. disconnected

C observe whether the server side has received the message, the following situation indicates that ServerAgent opened successfully

[Email protected] ~]#/opt/soft/serveragent-2.2.1/startagent.sh INFO    2016-02-18 10:52:51.749 [KG.APC.P] (): Binding UDP to 4444INFO    2016-02-18 10:52:52.749 [KG.APC.P] (): Binding TCP to 4444INFO    2016-02-18 10:52:52.754 [kg . APC.P] (): [email protected] Agent v2.2.0 startedinfo    2016-02-18 10:56:55.198 [KG.APC.P] (): Accepting new TCP Connec tion        #成功连接INFO    2016-02-18 10:57:00.830 [KG.APC.P] (): Yep, we received the ' Test ' command #接收到test消息INFO    2016-02-18 10:57:05.185 [KG.APC.P] (): Client disconnected  #断开连接

2 JMeter client-side monitoring test

A open Jmeter.bat, add listener Permon Metrics collector-add Row Add a line of monitor configuration (modify HOST/IP to test IP)-run-Observe the server log as the chart icon content.

Log on ServerAgent side:
INFO 2016-02-18 11:02:14.197 [KG.APC.P] (): Accepting new TCP connectioninfo 2016-02-18 11:02:14.243 [KG.APC.P] (): Yep, we received the ' test ' commandinfo 2016-02-18 11:02:14.246 [KG.APC.P] (): Starting Measures:cpu:INFO client Disconnected

b When the jmeter is running, the connection is then disconnected immediately and the data we want is not available. Conjecture requires a time-controlled component that enables it to acquire data for a period of time.

I step: Add a thread group (do not add a Send request), set the number of cycles to always, click Run.

Result: Successful connection and immediately disconnect

II Add a thread group, set the number of cycles to "sampler", add a single (not set parameter) to the thread group, add a perfmon Metrics collector Listener, and click Run.

Result: Successfully obtained chart chart, click Stop, that is, end listening data. The full configuration diagram is as follows

JMeter Monitoring server-side performance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.