In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to use JMeter for stress testing under Linux". 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 to use JMeter for stress testing under Linux".
JMeter is an open source project organized by Apache. It is a tool for functional and performance testing. It is implemented 100% in java.
Preparatory work
1. A Linux machine
two。 Download jdk: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
3. Download jmeter: http://jmeter.apache.org/download_jmeter.cgi
1. Configure Linux jdk environment
\ 1. Put the downloaded jdk into the Linux / root/java directory (note whether it is 32-bit or 64-bit when downloading). For example, my Linux system is 64-bit, download 64-bit jdk
\ 2. Decompress, extract command tar-zxvf jdk-8u191-linux-64.tar.gz
\ 3. Configure the jdk environment variable, edit / etc/profile, and add the following configuration at the end
Export JAVA_HOME=/root/java/jdk1.8.0_191export JRE_HOME=/root/java/jdk1.8.0_191/jreexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport PATH=$JAVA_HOME/bin:$PATH
\ 4. For the set configuration to take effect immediately, enter the command: source / etc/profile. Then type java-version to test
2. Configure jmeter
\ 1. You can copy the jmeter package on your windows to Linux directly.
\ 2. Extract to the same directory folder, extract command: unzip apache-jmeter-5.0.zip
\ 3. Configure the jmeter environment variable, edit / etc/profile, and add this configuration: export PATH=/root/jmeter/apache-jmeter-5.0/bin:$PATH
\ 4. Run the command source / etc/profile to make the configuration effective. If jmeter needs to add a plug-in, follow steps 1 and 2, and then overwrite it to the jmeter root directory.
3. Use the jmeter command
Jmeter-n-t test.jmx-l test.jtl
-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
4. Check the results of jmeter stress test
\ 1. After the test is complete, there will be an extra test.jtl file in the folder, copy it to the windows machine, and open jmeter on windows (Note: the versions of jdk and jmeter on Linux must be consistent with those on windows, including plug-ins)
\ 2. Create a new thread group and add the listeners you need to view
\ 3. Import test.jtl file and view the report.
Summary Report
TPS
Response time
These are all the contents of the article "how to use JMeter for stress testing under Linux". 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.
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.