Detailed explanation of how to run jmeter under Linux system and optimize local memory

Detailed explanation of how to run jmeter under Linux system and optimize local memory

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:
-g : result.jtl The path to an existing .jtl file.
-o : Directory for storing HTML reports

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:
  • Jmeter custom function base64 encryption implementation process analysis
  • Detailed explanation of Jmeter post file upload implementation process
  • Jmeter generates UUID as a unique identifier process diagram
  • How to set dynamic parameters in Jmeter command line script execution
  • Jmeter configuration proxy to achieve recording process diagram
  • Jmeter implements MD5 encryption for interface test input
  • Solution to the error problem of obtaining parameter token when logging in to Jmeter interface
  • How to run jmx scripts based on command line in Jmeter
  • Summary of Jmeter common function usage

<<:  5 ways to make your JavaScript codebase cleaner

>>:  Detailed explanation of MySQL monitoring tool mysql-monitor

Recommend

How to use negative margin technology to achieve average layout in CSS

We usually use float layout to solve the compatib...

Application examples of WeChat applet virtual list

Table of contents Preface What is a virtual list?...

SQL fuzzy query report: ORA-00909: invalid number of parameters solution

When using Oracle database for fuzzy query, The c...

How to operate Linux file and folder permissions

Linux file permissions First, let's check the...

Several ways to implement "text overflow truncation and omission" with pure CSS

In our daily development work, text overflow, tru...

MySQL 8.0.22 winx64 installation and configuration method graphic tutorial

The database installation tutorial of MySQL-8.0.2...

Nodejs error handling process record

This article takes the connection error ECONNREFU...

MySQL 5.7 cluster configuration steps

Table of contents 1. Modify the my.cnf file of se...

Detailed process of installing logstash in Docker

Edit docker-compose.yml and add the following con...

How to implement page jump in Vue project

Table of contents 1. Create a vue-cli default pro...

Encapsulation method of Vue breadcrumbs component

Vue encapsulates the breadcrumb component for you...

Docker implements container port binding local port

Today, I encountered a small problem that after s...

Pagination Examples and Good Practices

<br />Structure and hierarchy reduce complex...

Vue uniapp realizes the segmenter effect

This article shares the specific code of vue unia...