Basic instructions for installation and configuration of jmeter

1. Jmeter configuration installation (Windows10)

1) Software download

JDK   http://java.sun.com/javase/downloads/index.jsp (or local E:\Li Jing\Tool Software\jdk)

Jmeter   http://jmeter.apache.org/download_jmeter.cgi (E:\Li Jing\Tool Software\jmeter)
Note: Link: http://pan.baidu.com/s/1dFr10Hz  Password: bu3u

2) JDK installation

Download jdk1.6.0_10.exe, then click the default installation, usually installed to the C:\Program Files\Java directory. Click "This Computer" right-click "Properties", click "Advanced System Settings" (Advanced) in the pop-up dialog box, click "Environment Variables", click "New" under System Variables, and enter: CLASSPATH in the variable name, variable value Enter: C:\Program Files\Java\jdk1.6.0_10\lib\dt.JAR; C:\Program Files\Java\jdk1.6.0_10\lib\TOOLS.JAR; C:\Program Files\Java\jdk1 .6.0_10\BIN; Click "OK", then press "New", enter: JAVA_HOME in the variable name, enter in the variable: C:\Program Files\Java\jdk1.6.0_10; click "OK", select the PATH variable Click "Edit" to add %JAVA_HOME%/bin after the variable value, then "OK".

3) Jmeter installation
 Extract the apache-jmeter-2.13.zip file to the F drive, and extract this article to the F:\apache-jmeter-2.13 directory.

Click "This Computer" right-click "Properties", click "Advanced System Settings" (Advanced) in the pop-up dialog box, click "Environment Variables", click "New" under System Variables, and enter in the variable name: JMETER_HOME, variable value Enter: C:\jakarta-jmeter-2.3.4, click "OK", select the CLASSPATH variable, click "Edit" and add %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar;% JMETER_HOME%\lib\jorphan after the variable value .jar;%JMETER_HOME%\lib\logkit-1.2.jar, then "OK".

Then click ApacheJMeter in the bin folder of the Jmeter directory to open Jmeter.

2. Installation and configuration of Jmeter monitoring server performance plug-in

1) Software download

First go to the website http://jmeter-plugins.org/downloads/all/ to  download the resource
ServerAgent-2.2.1.zip
JMeterPlugins-Standard-1.3.1.zip
JMeterPlugins-Extras-1.3.1.zip

Among them, JMeterPlugins-Standard and JMeterPlugins-Extras are on the client side, and ServerAgent is on the server side.

2) Configuration

将 JMeterPlugins-Standard-1.3.1.zip 中 lib\ext 目录下的 JmeterPlugins-Standard.jar 文件都放到apache-jmeter-2.13\lib\ext目录中。
    将 JMeterPlugins-Extras-1.3.1.zip 中 lib\ext 目录下的 JMeterPlugins-Extras.jar 文件放到apache-jmeter-2.13\lib\ext目录中。
    将 ServerAgent-2.2.1 放到要监控的服务器中待使用。

3.    Jmeter监控服务器性能测试

1)  运行Jmeter,打开“F:\apache-jmeter-2.13\bin”双击“ApacheJMeter”。

2)  运行 ServerAgent-2.2.1\bin\startAgent.bat(Linux使用startAgent.sh)。
(默认端口为4444,也可以参数指定 –udp-port 4445 –tcp-port 4445)
可以看到输出内容如下:

INFO    2016-02-23 21:21:37.209 [kg.apc.p] (): Binding UDP to 4444

INFO    2016-02-23 21:21:38.208 [kg.apc.p] (): Binding TCP to 4444

INFO    2016-02-23 21:21:38.210 [kg.apc.p] (): JP@GC Agent v2.2.0 started。

3)  建立测试计划

选中“测试计划”右键“添加”-“监听器”-“jp@gc - PerfMon Metrics Collector”。

 

 

点击上面的启动按钮后,查看ServerAgent日志出现:

INFO    2016-02-23 21:34:46.966 [kg.apc.p] (): Accepting new TCP connection

INFO    2016-02-23 21:34:46.969 [kg.apc.p] (): Yep, we received the 'test' command

INFO    2016-02-23 21:34:46.971 [kg.apc.p] (): Starting measures: cpu:

INFO    2016-02-23 21:34:47.123 [kg.apc.p] (): Client disconnected

Select the "Test Plan" right-click "Add" - "Threads (Users)" - "Thread Group", set the number of loops to: forever.

 

 

Select "Thread Group" and right-click "Add" - "Sampler" - "Http Request".

 

Select "Thread Group" and right-click "Add" - "Listener" - "Aggregate Report" and "View Result Tree".

Click Run, and then start it on the jp@gc - PerfMon Metrics Collector interface, and you can see the following figure.

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324767681&siteId=291194637