Jmeter can be used for performance testing, but it cannot monitor the memory and CPU well. This article introduces two methods to monitor memory and CPU.
1. jmeterplugins plugin
Most of the time, we need to check the memory and CPU information for testing the performance to determine the System Bottleneck. jmeter does not provide good support for CPU and memory monitoring. In many cases, we can only observe it through the resource monitor of the system. It is inconvenient to record a flash. Fortunately, Google developed a jmeter plug-in jmeterplugins that specifically monitors and makes up for jmeter's shortcomings. The following describes the plug-in jmeterplugins.
Currently I am using a JMeterPlugins-Standard-1.2.0 with a ServerAgent-2.2.1 version.
1. jmeterplugins
Http://jmeter-plugins.org/downloads/all/ select the desired version, download it
2. Configure and use jmeterplugins
First extract the downloaded file, get the JMeterPlugins-Standard-1.2.0 and ServerAgent-2.2.1.
Step 1: copy the JMeterPlugins-Standard-1.2.0 \ Lib \ ext \ JMeterPlugins-Standard.jar package to the ext directory under the lib directory of jmeter and restart jmeter
At this point, click Add listener to see a lot of files starting with [email protected.
Step 2: here we use the monitoring memory: [email protected]-perfmon metrics collectot. In Windows, double-click to run/serveragent/startagent. BAT file, we need to copy the serveragent directory and the following files to our testing server, and then click open (I am a local machine, directly open this application system on the local machine ), its default port is 4444.
After everything is ready, Click start to get the following information:
You can get the common performance values you need when the system is running.
In addition, this plug-in can monitor other information, such as hits per second and transactions per second.
Ii. jconsole
Jconsole is a built-in JDK tool (jdk1.6.0 _ 21 \ bin \ jconsole.exe). It is easy to open this tool. If you have configured the jmeter running environment, then you do not need to perform other configurations. CLICK: start -- run -- Enter cmd -- and then enter "jconsole" on the command line interface to bring up the Java Monitoring and Management Console]
The following page is displayed:
Select a local process and click sun. Tools. jconsole. jconsole, and then click Connect to view the memory and CPU usage.
Of course, to obtain the server memory usage and other information, you can also select the remote process under the local process, enter the IP address of the server to be tested in the text box: port, enter the user name and password below and click Connect to see what will happen.
At this point, the two methods are completely explained. The specific analysis is beyond the scope of this chapter.
Jmeter Learning (15th) jmeter monitoring memory and CPU