In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Use the meter stress test in the linux environment:
Deployment in 1.linux environment: install jdk on the Linux server first:
two。 Take jdk-8u172-linux-x64.tar.gz as an example:
Download address: http://www.oracle.com/technetwork/java/javase/downloads/index.html
1. Choose according to the model of your server: the editor is 64-bit. Here, take 64-bit as an example:
3. Then send the download tar.gz file to the server:
Here, we can use xshell to connect to the server, and also download xftp to connect to the server, and then transfer the files of these corresponding files to the server through xftp. The corresponding xshell is as follows: my cloud opening address, which can be downloaded without a password.
Link: https://pan.baidu.com/s/1I4C6z_ooo9MsANJqQNRvfQ password: 7mbk
4. Then install the xshell file, and then configure the ip of the corresponding server, the user name and password of the application
5. Then install xftp. After the installation is successful, look at the connection interface of xshell and there will be an icon of xftp.
6. Click xftp at this time, and then click and you can see that the left is your own local, and the right is the file of the server, which makes it convenient for the user to view the file of the server, and you can upload the file to the server at any time.
7. Transfer the jdk package to the server and put it in the / opt directory
8.cd / opt
9. Give run permissions to the installation package
10.chmod 755 jdk-8u172-linux-x64.tar.gz
11. Then: ll
twelve。 To view the file, you have the execute permission:-rwxr-xr-x 1 root root 190921804 Jul 5 13:26 jdk-8u172-linux-x64.tar.gz
13. Then decompress: tar xzvf jdk-8u172-linux-x64.tar.gz / usr/lib
14. Then start to configure the environment variables: (the specific Jdk path is based on its own decompression path)
15.vim / etc/profile
16. Enter I to put the file into edit mode, and then enter the corresponding environment variable:
Export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_172export JRE_HOME=$ {JAVA_HOME} / jreexport CLASSPATH=.:$ {JAVA_HOME} / lib:$ {JRE_HOME} / libexport PATH=$ {JAVA_HOME} / bin:$PATH
Then enter: esc, then enter: wq enter
17. Make the configuration file effective, source / etc/profile
18. Then check, java-version
The results are as follows:
Java version "1.8.0,172"
Java (TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot (TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
It indicates that the configuration is successful.
Then configure linux, the jmeter environment under the environment:
1. Download: apache-jmeter-4.0.tgz, upload to the server; (at the same time, keep a copy locally, which will be used later)
two。 Then extract it to the currently uploaded directory: jmeter
Tar zxvf apache-jmeter-4.0.tgz jmeter
3. Then configure the extracted file to the corresponding environment variable:
Export JMETER_HOME=/root/jmeterexport CLASSPATH=$JMETER_HOME/lib/ext/ApacheJMeter_core.jar:$JMETER_HOME/lib/jorphan.jar:$CLASSPATHexport PATH=$JMETER_HOME/bin:$PATH:$HOME/bin
4.source / etc/profile aims to make the configuration file effective
5. [root@yace01] # jmeter-v
4.
6. The icon above indicates that the configuration is successful.
Download and install 7.JMeter and JMeterPlugin
JMeterPlugin can make a good statistical chart of the jtl files generated by JMeter, and it also supports the monitoring of cpu, memory, swap, disk io and network of the machine. It is a good plug-in.
Download the JMeter plug-in from: https://jmeter-plugins.org/downloads/all/
1.jmeter-plugins-manager-1.1.jar
2.JMeterPlugins-Extras-1.4.0.zip
3.JMeterPlugins-Standard-1.4.0.zip
Corresponding cloud disk download link:
Link: https://pan.baidu.com/s/1U0ouoO347gHic9Hz0g5UHA password: a78w
You can also download it by yourself. It's all right.
The above plug-ins: after the download is complete, for example:
Jmeter-plugins-manager.jar, and other plug-ins, after the download is complete, place the downloaded jmeter-plugins-manager-0.11.jar file in the corresponding jmeter\ lib\ ext directory, and then restart JMeter.
Other plug-ins are in this way.
Write a test plan
1. In GUI mode, create a new test plan to form a jmx file (there are some listening files in the file, such as viewing the result tree, aggregation report, etc.), save and upload to the corresponding directory of the linux machine, and add the corresponding timer, aggregate report, etc.
two。 Find your test plan in the linux directory, and vim opens it for editing:
] 200 threads 100 fixed timer interval
The corresponding parameters of the added components can be found in it. When adjusting the parameters, just edit it here and ok it.
3. Execute the above documents:
Find the path file of the corresponding jmx file, and start execution:
Jmeter-n-t test.jmx-l test.jtl to generate the test report:
The test.jtl file is a generated report
4. After execution, an end of run appears on the interface.
Here are some additions, some non-GUI commands:-h help-> print out useful information and exit
-n non-GUI mode-> running JMeter in non-GUI mode
-t test file-> JMeter test script file to run
-l log file-> the file that records the result
-r remote execution-> start remote service
-H proxy host-> set the proxy host used by JMeter
-P proxy port-> set the port number of the proxy host used by JMeter
Result file
1. Pass the above file, and then transfer the xftp file to this time, open the jmeter of GUI locally, then click: create test plan, then click create monitor-aggregate report, create view result tree, etc.; then click browse on the GUI interface, load the jtl file into it, and you can see the test report results; (specific and report, view result tree, etc.)
All of the following figures:
two。 Note that the local jmeter is creating a plan. When writing a script, the version of jmeter had better be the same as that of linux, otherwise it is easy to report errors.
Summary
The above is the installation and operation of jmeter in the linux server introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.