Hitachi

uCosminexus Application Server Maintenance and Migration Guide


3.3.17 Settings for Acquiring the JavaVM Material

This section describes the settings for acquiring the following JavaVM material:

For details about the JavaVM startup options, see 14. Options for Invoking JavaVM in the uCosminexus Application Server Definition Reference Guide.

By default, the thread dumps of JavaVM are output under the following directory:

By default, the JavaVM log is output under the following directory:

When you want to change the output destination, you must change the log output directory in the ejb.server.log.directory parameter in the <configuration> tag of a logical J2EE server (j2ee-server) in the Easy Setup definition file before starting JavaVM or J2EE server.

The respective settings for acquiring the thread dumps of JavaVM, JavaVM log (JavaVM log file), and event log of the Explicit Memory Management functionality is as follows:

Organization of this subsection

(1) Settings for Acquiring Thread Dumps of JavaVM

This subsection describes the settings for acquiring thread dumps of JavaVM.

The contents output to the thread dump of JavaVM differs depending on the JavaVM startup option specified in the JavaVM startup parameter in the Easy Setup definition file. Define the JavaVM startup option in the JavaVM startup parameter in <configuration> tag of a logical J2EE server (j2ee-server). The setting contents of a JavaVM startup parameter are as follows:

<param-name> tag

add.jvm.arg

<param-value> tag

JavaVM-startup-option

The following table describes the options to be specified for JavaVM startup options. For details about the options, see 14. Options for Invoking JavaVM in the uCosminexus Application Server Definition Reference Guide.

Table 3‒21: Options to be specified for JavaVM startup option (Settings for acquiring the thread dumps of JavaVM)

Option

Description

-XX:+HitachiThreadDump

Output the extended thread dump. By default, the thread dump is output.

-XX:+HitachiThreadDumpToStdout

The extended thread dump is output to the standard output. By default, the thread dump is output.

-XX:+HitachiThreadDumpWithHashCode

The hash code of the thread is output to the thread information. By default, the thread dump is output.

-XX:+HitachiThreadDumpWithCpuTime

The user CPU time and kernel CPU time after the thread starts are output to the thread information. By default, the thread dump is output.

-XX:+HitachiThreadDumpWithBlockCount

The number of times the process was blocked by the thread and the number of times the process is in the pending state is output to the thread information. By default, the thread dump is output.

-XX:+HitachiOutOfMemoryAbort

-XX:+HitachiOutOfMemoryAbortThreadDump

In either of the settings, the thread dump is output when forced termination is performed due to OutOfMemoryError. If the C heap in the J2SE class library is insufficient, and the C heap in the processing of JavaVM is insufficient, the thread dump is not output

-XX:+HitachiOutOfMemoryAbortThreadDumpWithJHeapProf

A class-wise statistical information is output in the thread dump that is output when forced termination is performed due to OutOfMemoryError. Nothing is output by default.

To change the output destination of the thread dump file, specify the output destination in the environment variable JAVACOREDIR. For details on the environment variable JAVACOREDIR, see 14.7 Details of environment variables used in JavaVM in the uCosminexus Application Server Definition Reference Guide.

(2) Settings for acquiring JavaVM logs

This subsection describes the settings for acquiring JavaVM logs.

The JavaVM log is a log that you can acquire with the extension option added by Hitachi in the standard JavaVM. You can acquire more troubleshooting information as compared to the information acquired from the standard JavaVM. This log file is called JavaVM log file. The JavaVM GC log is also output to this file.

To acquire the JavaVM log file, specify a JavaVM startup option in the JavaVM startup parameter in the Easy Setup definition file. Define the JavaVM startup option in the JavaVM startup parameter in the <configuration> tag of the logical J2EE server (j2ee-server). The following are the setting contents of the JavaVM startup parameter:

<param-name> tag

add.jvm.arg

<param-value> tag

JavaVM-startup-option

The following table describes the options to be specified for the JavaVM startup option. For details about the options, see 14. Options for Invoking JavaVM in the uCosminexus Application Server Definition Reference Guide.

Table 3‒22: Options to be specified for JavaVM startup option (Settings for acquiring JavaVM log)

Option

Description

-XX:+HitachiOutOfMemoryStackTrace

-XX:+HitachiVerboseGC

-XX:+HitachiOutOfMemoryHandling

-XX:+HitachiJavaClassLibTrace

-XX:+JITCompilerContinuation

If any of the following options is specified, the JavaVM log file is output:

  • If -XX:+HitachiOutOfMemoryStackTrace is specified, the exception information and the stack trace are output to the JavaVM log file. If you specify this option, -XX:+HitachiOutOfMemorySize and -XX:+HitachiOutOfMemoryCause are also specified concurrently.

  • If -XX:+HitachiVerboseGC is specified, the extended verboseGC information is output to the JavaVM log file, when the GC occurs.

  • If -XX:+HitachiOutOfMemoryHandling is specified, information related to the frequency of occurrence of OutOfMemory is output to the JavaVM log file when OutOfMemory occurs due to Java heap insufficiency or insufficient metaspace area.

  • If -XX:+HitachiJavaClassLibTrace is specified, the stack trace of the class library is output to the JavaVM log file.

  • If -XX:+JITCompilerContinuation is specified, the JIT compiler continuation functionality is enabled, therefore, if the JIT compilation fails due to a logical inconsistency in a method configuring the application, the JIT compiler continuation functionality log is output to the JavaVM log file.

Specify the following extension options based on the requirements and set the output methods and the output contents of the JavaVM log file:

The settings to output the extended verboseGC information to the maintenance information of JavaVM (Java heap information) and the GC log are described below. With the options described in the following table, apply the output of extended verboseGC information and specify the output format of the extended verboseGC information.

Table 3‒23: Options to be specified for output of the extended verbosegc information

Option

Description

-XX:+HitachiVerboseGC

The extended verboseGC information is output to the JavaVM log file.

-XX:+HitachiVerboseGCPrintDate

The date is output to each line of the extended verboseGC information.

-XX:+HitachiVerboseGCCpuTime

The CPU usage time of the thread executing the GC from the start until the termination of the GC is output. The CPU usage time is divided into the CPU time spent in the user mode and the CPU time spent in the kernel mode and then output.

-XX:HitachiVerboseGCIntervalTime = Time-intervals (seconds)

Specify the output intervals of the extended verboseGC information.

-XX:+HitachiVerboseGCPrintCause

The cause for occurrence of the GC is output to the extended verboseGC information.

-XX:+HitachiOutputMilliTime

Output the date (up to milliseconds) to each line of the extended verboseGC information.

-XX:+HitachiCommaVerboseGC

The extended verboseGC information is output in the CSV format.

-XX:+HitachiVerboseGCPrintTenuringDistribution

The tenuring distribution information of the Survivor area is output. For details about the output format and output information, see 9.11 Tenuring distribution information output functionality of the Survivor area.

-XX:+HitachiVerboseGCPrintJVMInternalMemory

Heap information managed in JavaVM is output to the JavaVM log file.

-XX:+HitachiVerboseGCPrintThreadCount

To monitor the number of Java threads, the number of Java threads is output to the JavaVM log file.

-XX:+HitachiVerboseGCPrintDeleteOnExit

The cumulative heap size secured by JavaVM by invoking java.io.File.deleteOnExit()and the number of times the method is invoked are output to the JavaVM log file.

You can acquire the information to estimate the Java heap area size and the metaspace area size required by the server from the extended verbosegc information.

(3) Settings for acquiring the event log of Explicit Memory Management functionality

This point describes the settings for acquiring the Event log of Explicit Memory Management functionality. This point also describes the relation of the event log of the Explicit Memory Management functionality with the JavaVM log file.

The settings required for acquiring the event log of Explicit Memory Management functionality are as follows:

For a J2EE server or batch server, you can set up the above-mentioned settings using JavaVM startup option specified in the JavaVM startup parameter in the Easy Setup definition file. Set up the JavaVM startup option in the JavaVM startup parameter in the <configuration> tag of a logical J2EE server (j2ee-server). The settings of the JavaVM startup parameter are as follows:

<param-name> tag

add.jvm.arg

<param-value> tag

JavaVM- startup-option

The following table describes the options to be specified for the JavaVM startup option. For details about the options, see 14. Options for Invoking JavaVM in the uCosminexus Application Server Definition Reference Guide.

Table 3‒24: Option to be specified for JavaVM startup option (Settings for acquiring the event log of the Explicit Memory Management functionality)

Setting contents

Option

Description

Setting of output level

-XX:HitachiExplicitMemoryLogLevel:character-string

Specify log output level.

  • none

    Event log of the Explicit Memory Management functionality is not output.

  • normal

    Specify for normal operation. The status of the Explicit heap is output when an event that causes a significant change in the size of the Explicit heap occurs or when GC occurs.

  • verbose

    Specify if a detailed log is required when error occurs.

  • debug

    Specify when a detailed log is required more than verbose. Performance of the system is lowered.

Settings for file to be output

-XX:HitachiExplicitMemoryJavaLog:character-string

Specify the file name of file that outputs event log.

-XX:HitachiExplicitMemoryJavaLogFileSize=positive-integer

specify the maximum file size for each file.

-XX:HitachiExplicitMemoryJavaLogNumberOfFile=positive-integer

Specify a maximum number of log files to be created. When a specified value exceeds, a wraparound is performed, and the log is output to the file that was created first.

Note that the event log of the Explicit Memory Management functionality is output to a file that differs from the JavaVM log file. However, the values set up in the JavaVM log file are inherited for some options.

The following table describes the items that inherit the settings of the JavaVM log file.

Table 3‒25: Items that inherit the settings of the JavaVM log file

Option name

Meaning

Default value

-XX:+HitachiJavaLogNoMoreOutput

An option to specify behavior when an attempt to output the log file fails.

Enabled

-XX:+HitachiOutputMilliTime

An option to specify whether to set millisecond as the unit of time output to the log file.

Disabled

For details about the JavaVM extension options, see 14.2 Details of JavaVM extension options in the uCosminexus Application Server Definition Reference Guide.