Hitachi

uCosminexus Application Server Operation, Monitoring, and Linkage Guide


4.3.3 Settings for the execution environment

The resource depletion monitoring functionality can be used on the J2EE server or batch server. In J2EE servers, the resources that can be monitored include memory, file descriptors, number of threads, thread dumps, HTTP requests pending queue, number of sessions, and connection pools. In batch servers, the resources that can be monitored include memory, file descriptors, number of threads, thread dumps, and connection pools. Note that file descriptors cannot be monitored in Windows and AIX. Furthermore, the number of threads cannot be monitored in Linux.

The following settings are required when using the resource depletion monitoring functionality:

Organization of this subsection

(1) Setting J2EE servers

You implement the J2EE server settings in the Easy Setup definition file. Specify the definition for resource depletion monitoring functionality in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file. You specify the settings for each batch server in the user properties for the batch server, in the Easy Setup definition file.

The following two definitions are specified for the resource depletion monitoring functionality in the Easy Setup definition file:

(a) Enabling the resource depletion monitoring function

Specify whether you want to use the resource depletion monitoring functionality in the ejbserver.watch.enabled parameter of the <configuration> tag that exists in the logical J2EE server (j2ee-server) in the Easy Setup definition file. By default, the resource depletion monitoring function is applied and all the resources are monitored. To disable the resource depletion monitoring functionality, you specify false (disable the resource depletion monitoring functionality) in the ejbserver.watch.enabled parameter.

(b) Setting for monitoring for each resource type

The following table describes the definitions for monitoring each resource type exists in the Easy Setup definition file:

Table 4‒4: Definition of the resource depletion monitoring functionality in the Easy Setup definition file

Type of resource

Parameters to be specified

Setting contents

Memory

  • ejbserver.watch.memory.enabled

  • ejbserver.watch.memory.threshold

  • ejbserver.watch.memory.interval

  • ejbserver.watch.memory.writefile.enabled

These parameters can be used to specify the memory monitoring settings for each J2EE server or batch server.

Specify the alert issue existence, monitoring threshold value, monitoring interval, and existence of output of resource depletion monitoring log file based on memory monitoring.

Also, specify the number of files and the size for the resource depletion monitoring log files.#1#2

File descriptors

  • ejbserver.watch.fileDescriptor.enabled

  • ejbserver.watch.fileDescriptor.threshold

  • ejbserver.watch.fileDescriptor.interval

  • ejbserver.watch.fileDescriptor.writefile.enabled

These parameters can be used to specify the file descriptor monitoring settings for each J2EE server or batch server.

Specify the alert issue existence, monitoring threshold value, monitoring interval, and existence of output of resource depletion monitoring log file based on file descriptor monitoring.

Also, specify the number of files and the size for the resource depletion monitoring log files.#2

Number of threads

  • ejbserver.watch.thread.enabled

  • ejbserver.watch.thread.threshold

  • ejbserver.watch.thread.interval

  • ejbserver.watch.thread.writefile.enabled

These parameters can be used to specify the thread monitoring settings for each J2EE server.

Specify the alert issue existence, monitoring threshold value, monitoring interval, and existence of output of resource depletion monitoring log file based on the monitoring of the number of threads.

Also, specify the number of files and the size for the resource depletion monitoring log files. #2

Thread dump

  • ejbserver.watch.threaddump.enabled

  • ejbserver.watch.threaddump.threshold

  • ejbserver.watch.threaddump.interval

  • ejbserver.watch.threaddump.writefile.enabled

  • ejbserver.server.threaddump.filenum

These parameters can be used to specify the thread dump monitoring settings for each J2EE server or batch server.

Specify the alert issue existence, monitoring threshold value, monitoring interval, and existence of output of resource depletion monitoring log file based on thread dump monitoring.

Also, specify the number of files and the size for the resource depletion monitoring log files.#2

HTTP requests pending queue

  • ejbserver.watch.defaultRequestQueue.enabled

  • ejbserver.watch.defaultRequestQueue.threshold

  • ejbserver.watch.defaultRequestQueue.interval

  • ejbserver.watch.defaultRequestQueue.writefile.enabled

Make the settings for monitoring the default HTTP requests pending queue for each J2EE server.

Specify the alert issue existence, monitoring threshold value, monitoring interval, and existence of output of resource depletion monitoring log file based on the monitoring of the HTTP requests pending queue.

Also, specify the number of files and the size for the resource depletion monitoring log files.#2

Number of sessions

--

Specify the number and size of resource depletion monitoring log files in each J2EE server.#2

Connection pool

--

Specify the number and size of resource depletion monitoring log files in each J2EE server or batch server.#2

Legend:

--: None

#1 To perform memory monitoring, define the Java VM start parameters under the <configuration> tag for the logical J2EE server (j2ee-server). Specify -XX:MetaspaceSize and -XX:MaxMetaspaceSize as the Java VM start parameters and set the same memory size for these parameters. If you set different memory sizes, no alert might be generated when Full GC occurs. The following contents are to be specified for the JavaVM start parameter:

<param-name> tag

add.jvm.arg

<param-value> tag

-XX:MetaspaceSize=setup-value

-XX:MaxMetaspaceSize=setup-value

To detect symptoms that trigger Full GC, you must tune the sizes of the Old and New areas of Java VM.

#2 Specify the number of files and the size for the resource depletion monitoring log file in the following parameters of the Easy Setup definition file:

  • ejbserver.logger.channels.define.name-of-resource-to-be-monitoredWatchLogFile.filenum

    Specifies the number of resource depletion monitoring log files for each resource type.

  • ejbserver.logger.channels.define.name-of-resource-to-be-monitoredWatchLogFile.filesize

    Specifies the size of the resource depletion monitoring log file for each resource type.

In these parameters, specify the channel name for each resource type as the name of the resource to be monitored.

  • For memory: MemoryWatchLogFile

  • For file descriptor: FileDescriptorWatchLogFile

  • For the number of threads: ThreadWatchLogFile

  • For thread dump: ThreaddumpWatchLogFile

  • For HTTP requests pending queue: RequestQueueWatchLogFile

  • For the number of sessions: HttpSessionWatchLogFile

  • For connection pools: ConnectionPoolWatchLogFile

For details on the Easy Setup definition file and the parameters to be specified, see 4.3 Easy Setup definition file in the uCosminexus Application Server Definition Reference Guide.

(2) Settings for Hitachi Connector Property file

Make the settings for monitoring the connection pool in each resource adapter. You implement the resource adapter property settings using the server management commands and the Hitachi Connector Property file.

Specify the issuing of alert, monitoring threshold values, monitoring intervals, and application of resource depletion monitoring log file output based on monitoring the connection pool in the <WatchEnabled>, <WatchThreshold>, <WatchInterval>, and <WatchWriteFileEnabled> tag specified as the <property-name> tag of the Hitachi Connector Property file.

For details on the tags to be specified, see 4.1 HITACHI Connector Property file in the uCosminexus Application Server Application and Resource Definition Reference Guide.

For resource adapter property settings in the server management commands and the Hitachi Connector Property file, see 3.5.1 Procedure for setting the properties of a J2EE resource adapter in the uCosminexus Application Server Application Setup Guide.

(3) Setting J2EE applications

You implement the settings for the J2EE applications in the execution environment using the server management commands and the property files. Use the WAR property file to define the resource depletion monitoring functionality.

The tags specified in the WAR property file correspond to cosminexus.xml. For details on the definitions of cosminexus.xml, see 4.3.2 Definition in cosminexus.xml.