Monitoring of stress testing and system management is useful. With stress testing, server performance monitoring provides additional information. This also makes it easier to see the relationship between server performance at the client and response time. As a system management tool, monitoring provides an easy way to monitor multiple servers from a single console. The monitor is for the status of the work in Tomcat servlet 5. In theory, any JMX-enabled servlet container (Java Management extension) port status Servlet can provide the same information.
For those who want to use the monitor with other servlets or EJB containers, the Tomcat servlet's status should not be modified with the memory statistics of other containers. Thread information, you will need to change the Mbeanserver lookup to retrieve the correct mbean.
Add a server
The first step is to add a thread group element. The thread group tells JMeter the number of threads you want. Always use 1 because we use jmeter as a monitor. This is very important for those unfamiliar with server monitoring. As a general rule, using multiple threads on separate servers is bad and can cause significant stress.
continue adding Threadgroup elements first select the test plan, click your right mouse button Add a menu, then choose add a?? threadgroup .
You should now see the thread group elements under the test plan. If you don't see the element, "expand" the test plan tree element by clicking Test Plan.
Figure 13.1. Default values for thread groups
Always change the cycle count (or some large number) so that enough samples are generated.
HTTP Authentication Manager
Add HTTP Authorization Manager the element of the thread group ( add a?? configuration element one?? HTTP Authorization Manager ). Enter the user name and password for your Web server.
Important: Monitors are only available for TOMCAT5 build 5.0.19 and updates. Please describe how to set up a tomcat-referred Tomcat 5 document.
- Leave a blank base URL
- Enter user name
- Enter password
add an HTTP request
add http request element of the thread group ( add one?? sampler one?? HTTP request ). Then, select the HTTP request element on the tree and edit the following properties):
- Change the Name field to " Server Status .
- The IP address or host name entered
- Input port number
- set the Path field to " /manager/Status "If you use Tomcat.
- add a request parameter named " XML "in uppercase. Give it the value " Real " in lowercase.
- Check the using the sampler at the bottom of the monitor
adding a constant timer
The thread group adds a timer (Adda??a timer ?? constant Timers ). Enter the " thread delay " box for 5000 milliseconds. In general, use a shorter interval of more than 5 seconds to add pressure to your server. Find out what is acceptable to the interval before you deploy monitoring in a production environment.
add a listener to store the results
If you want to save the original results from the server, add a simple data Span id= "outfox_jtr_trans_node-122" class= "Outfox_jtr_trans_node" > listener
Select and add an element of a thread group simple data of the writer Listener ( < Span id= "outfox_jtr_trans_node-127" class= "Outfox_jtr_trans_node" > add one?? listener one?? Simple data of the writer ). Next, you need to specify a directory and the file name of the output file. You can go to the File Name field type, or select the Browse button and browse to a directory and enter a file name.
Adding monitoring results
Add Listener by selecting the elements of the test plan ( add a?? listener one?? Monitoring Results ).
By default, the listener selects the result of the first Connector sample response. The connector prefix realm can be used to select a different connector. If specified, the listener selects the prefix that the first connector matches. If no match is found, the first connector is selected.
There are two tabs to monitor the results of listeners. The first one is " Health ", which shows the status of the last example of monitoring. The second tab is " performance ", which shows the performance of a historical server.
Pay attention to how health is calculated. Typically, the server crashes when it runs out of memory or reaches the maximum number of threads. In the case of Tomcat 5, once the thread is maxed out, the request is placed in a queue until a thread is available. The relative importance of threads differs from the container, so the current implementation using 50/50 is conservative. A container for efficient and thread management may not see any performance degradation, but using memory will definitely show the impact.
The performance graph shows four different lines. The free memory line shows too much memory left in the currently allocated block. Tomcat 5 has the maximum return memory, but it is not a painting. In a well-tuned environment, the server should not reach the maximum memory.
Notice both sides of the chart's title graph. Left is and percent dead/healthy right. If the memory on the downline rises rapidly, it can show insufficient memory. In this case, it is a good idea to profile the application with the blue Optimizeit or Jprobe. What you want to see is the normal mode for load, memory and thread. Any emotional behavior usually indicates poor performance or some kind of error.
JMeter set up a surveillance test plan