Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How Jmeter monitors server performance

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how Jmeter monitors server performance". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how Jmeter monitors server performance".

First, download

First go to the website http://jmeter-plugins.org/downloads/all/ to 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 client-side, and ServerAgent is server-side.

II. Configuration

Put all the JmeterPlugins-Standard.jar files in the lib\ ext directory in JMeterPlugins-Standard-1.3.1.zip into the apache-jmeter-2.13\ lib\ ext directory.

Place the JMeterPlugins-Extras.jar file in the lib\ ext directory in JMeterPlugins-Extras-1.3.1.zip into the apache-jmeter-2.13\ lib\ ext directory.

Put the ServerAgent-2.2.1 into the server you want to monitor for use.

III. Monitoring and control

1) apache-jmeter-2.12\ bin\ jmeter.bat start JMeter

The screenshot after the normal startup is successful is as follows:

If you can't start, check to see if the jdk version or jdk is installed correctly.

2) check whether the plug-in is loaded properly, as shown in the figure:

这里写图片描述

The one that begins with jp@gc appears after the plug-in is loaded.

3) run ServerAgent-2.2.1\ bin\ startAgent.bat (Linux uses startAgent.sh)

(the default port is 4444, or you can specify-udp-port 4445-tcp-port 4445 by parameter)

You can see that the output is as follows:

INFO 2016-02-23 21 (kg.apc.p): Binding UDP to 4444INFO 2016-02-23 21 (kg.apc.p): Binding TCP to 4444INFO 2016-02-23 21 (kg.apc.p): JP@GC Agent v2.2.0 started

one

two

three

one

two

three

4) in the test plan in JMeter, click the screenshot above to add the listener "jp@gc-PerfMon Metrics Collector"

After clicking the launch button above, the ServerAgent log appears:

INFO 2016-02-23 21 (kg.apc.p): Accepting new TCP connectionINFO 2016-02-23 21 (kg.apc.p): Yep, we received the 'test' commandINFO 2016-02-23 21 (kg.apc.p) (): Starting measures: cpu:INFO 2016-02-23 34 (kg.apc.p): Client disconnected

one

two

three

four

one

two

three

four

When running jmeter, the connection was successful and then immediately disconnected without getting the data we wanted. Conjecture requires a time-controlled component so that it can obtain data for a period of time.

Solution:

Add a thread group and set the number of cycles to "forever"

Add an arbitrary Sampler for the thread group (no parameters are set)

Add a PerfMon Metrics Collector listener; click run. (if the above has already been added, you can use it directly without adding it)

Then in the jp@gc-PerfMon Metrics Collector interface, start.

Result: successfully obtain the chart image and click stop to end the listening data. The screenshot below is shown below.

These are all the contents of the article "how Jmeter monitors server performance". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report