Tomcat UtilityExecutor Test

Since Tomcat version 9.0.14 an utility executor has been introduced. You can add this as a scheduled executor that can be used to process periodic utility tasks. The utility threads are non daemon by default.

To understand the usage of these utility threads and to figure out if the utility thread pool is configured right to support the utility tasks, administrators can periodically run the Tomcat UtilityExecutor test.

Target of the test : A Tomcat Server

Agent deploying the test : An internal agent

Outputs of the test : One set of results for the utility thread pool configured on the Tomcat server being monitored.

Configurable parameters for the test
Parameter Description

Test Period

How often should the test be executed.

Host

The IP address of the host for which this test is to be configured.

Port

Refers to the port at which the specified host listens to.

Measurement Mode

This test can extract metrics from Tomcat using either of the following mechanisms:

  • By deploying the egtomcat.war file in the <EG_INSTALL_DIR>\lib directory of the eG agent host on the Tomcat server;
  • By contacting the Java runtime (JRE) of Tomcat via JMX

To configure the test to use egtomcat.war file, first select the War file option. Then, refer to the How Does eG Enterprise Monitor Tomcat Servers? to know how to deploy the WAR file on the target Tomcat server.

On the other hand, if you want the test to use JMX instead, then first, select the JMX option. Then, follow the procedure detailed in the How Does eG Enterprise Monitor Tomcat Servers? to configure the test to use jmx. By default, the JMX option is chosen here.

JMX Remote Port

This parameter appears only if the Measurement Mode is set to JMX. Here, specify the port at which the JMX listens for requests from remote hosts. Ensure that you specify the same port that you configured in the catalina.sh (or catalina.bat) file in the <CATALINA_HOME_DIR>/bin folder of the target Tomcat server (refer to the How Does eG Enterprise Monitor Tomcat Servers? for more details).

JMX User, JMX Password, and Confirm Password

These parameters appear only if the Measurement Mode is set to JMX. If JMX equires authentication only (but no security), then ensure that the JMX User and JMX Password parameters are configured with the credentials of a user with read-write access to JMX. To know how to create this user, refer to the How Does eG Enterprise Monitor Tomcat Servers?. Confirm the password by retyping it in the Confirm Password text box.

JNDI Name

This parameter appears only if the Measurement Mode is set to JMX. The JNDIName is a lookup name for connecting to the JMX connector. By default, this is jmxrmi. If you have registered the JMX connector in the RMI registery using a different lookup name, then you can change this default value to reflect the same. 

Provider

This parameter appears only if the Measurement Mode is set to JMX. This test uses a JMX Provider to access the MBean attributes of the target Java application and collect metrics. Specify the package name of this JMX Provider here. By default, this is set to com.sun.jmx.remote.protocol.

SSL

This parameter appears only if the Measurement Mode is set to War File. Indicate Yes if the Tomcat server is SSL-enabled.

URL

This parameter appears only if the Measurement Mode is set to War File. Specify the URL of the managed Tomcat server to enable the test to connect to it and extract measures from it. The URL specification should be of the format: http://{TomcatIP}:{TomcatPort}.

UserName, Password, and Confirm Password

These parameters appear only if the Measurement Mode is set to War File. In the UserName text box, specify a name of a user who has been assigned the Manager role on the Tomcat server to be monitored; these users are typically allowed to control web applications deployed on the Tomcat server. Specify the Password of this user, and confirm the password by retyping it in the Confirm Password text box.

EncryptPass

This parameter appears only if the measurement modeis set to War File. Select Yes if you want to encrypt the password.

Timeout

Specify the duration (in seconds) for which this test should wait for a response from Tomcat. If there is no response from Tomcat beyond the configured duration, the test will timeout. By default, this is set to 240 seconds.

Measurements made by the test
Measurement Description Measurement Unit Interpretation

No of active threads

Indicates the number of threads in the utility thread pool that are currently processing a utility task.

Number

If the value of this measure is equal to the value of the No of threads in the pool measure, it implies all the threads in the pool have been utilized. Without spare threads, Tomcat will not be able to service subsequent utility tasks. To avoid this, you may want to consider increasing the pool size.

Recently completed tasks

Indicates the number of tasks that were recently completed by the threads in the utility thread pool.

Number

 

Thread pool core size

Reports the core size of the utility thread pool.

Number

 

No of peak threads

Indicates the high watermark of threads in the utility thread pool.

Number

 

No of threads in pool

Indicates the number of threads in the utility thread pool currently.

Number

If the value of this measure is equal to the value of the No of active threads measure, it implies that no threads are available in the pool for processing subsequent utility tasks. To pre-empt this occurrence, you may want to increase the pool size.

No of tasks

Indicates the number of tasks currently being processed by the threads in the pool.

Number

Compare the value of this measure with the No of threads in pool measure to ascertain whether/not the pool is sized with enough threads to service the utility tasks at hand. If not, you may want to increase the pool size.

Pool utilization

Indicates the percentage of the pool size that is actively engaged in processing utility tasks.

Percent

A value close to 100% indicates that almost all threads in the utility pool are busy processing tasks. This means that shortly, there will be no threads in the pool to process subsequent tasks. To avoid a t thread contention, you may want to increase the pool size.