1. Install the cross-system file transfer tool under Linux system Enter yum -y install lrzsz in the root directory of the root user 2. Upload the apache-jmeter-4.0zip package to the root directory of the Linux system using the rz command and decompress it 3. Configure jmeter environment variables vim /etc/profile add export PATH=/apache-jmeter-4.0/bin/:$PATH Note the path 4. Use the rz command to upload the jdk1.8 linux 64-bit version and unzip it to the usr/local directory Download the jdk installation package Download address: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 5. After decompression, configure the environment variables and enter the etc directory to edit the profile file using the vim command vim /etc/profile Add at the end JAVA_HOME=/usr/local/jdk1.8.0_151/ PATH=$JAVA_HOME/bin:$PATH CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export JAVA_HOME export PATH export CLASSPATH 6. After the modification is successful, use the command to make the configuration file take effect immediately source /etc/profile 7. After the configuration is completed, use jmeter -v to prove that the environment is set up OK 8. Linux: In the Linux environment, you need to modify the number of concurrency and execution time on the Windows jmeter, save the jmx file, and then pass it to Linux to run it with the jmeter -n -t test.jmx -l test.jtl command. Memory tuning is configured in the jmeter.sh file (the last line of java $JVM_ARGS -Xms1G -Xmx5G -XX:MaxPermSize=4096m -Dapple.laf.useScreenMenuBar=true -jar). Prevent jmeter from generating hprof log files in the jmeter file configuration (line 88 HEAP="-Xms1024m -Xmx10240m") 9. After giving the permissions, upload the test.jmx stress test script. After uploading, you also need to give this file executable permissions, chmod 775 test.jmx, and then ls. When the script color is green, it indicates that it is an executable file. 10. All is ready, ./startagent.sh starts monitoring; 11. ./jmeter -n -ttest.jmx -l test.jtl Start the stress test script to start stress testing -n means no GUI interface, -t means script, -l means generate jtl 12. The screen appears, indicating that the execution has started. The screen "end of run" indicates that the execution is complete. 13.jmeter 3.0 and above provide graphical html reports. After the run is completed, execute the command: jmeter -g test.jtl -o resultreport generates html report parameter: 14. Then resultreport is the generated report folder, download it and view the analysis; Note: If you need to modify the number of users or time in the test plan, you can execute vi script name to modify Okay, that's all for today. If you have time later, I will write a document about how to analyze HTML reports. This is the end of this article about how to run jmeter under Linux system and how to tune local memory. For more information about how to run jmeter under Linux system, please search previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: 5 ways to make your JavaScript codebase cleaner
>>: Detailed explanation of MySQL monitoring tool mysql-monitor
We usually use float layout to solve the compatib...
Table of contents Preface What is a virtual list?...
When using Oracle database for fuzzy query, The c...
Linux file permissions First, let's check the...
In our daily development work, text overflow, tru...
The database installation tutorial of MySQL-8.0.2...
This article takes the connection error ECONNREFU...
Table of contents 1. Modify the my.cnf file of se...
Edit docker-compose.yml and add the following con...
Table of contents 1. Create a vue-cli default pro...
Vue encapsulates the breadcrumb component for you...
Today, I encountered a small problem that after s...
<br />Structure and hierarchy reduce complex...
Step 1: Sign a third-party trusted SSL certificat...
This article shares the specific code of vue unia...