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
Effect picture (the border color is too light, pu...
With the continuous development of the Internet ec...
Table of contents Preface background Big guess Fi...
The author of this article @子木yoyo posted it on hi...
This reading note mainly records the operations r...
Countdown function needs to be implemented in man...
Just like code, you can add comments to tables an...
CSS 3 animation example - dynamic effect of Tab b...
1. Introduction The main value that SELinux bring...
Table of contents pom configuration Setting.xml c...
background Indexes are a double-edged sword. Whil...
Table of contents 1. Introduction 2. es5 method 3...
Achieve results The code is as follows html <t...
This article shares the specific code of js to ac...
Create a mysql user and authorize: Format: grant ...