3.3.17 Settings for Acquiring the JavaVM Material
This section describes the settings for acquiring the following JavaVM material:
-
Thread dumps of JavaVM
-
JavaVM log (JavaVM log file)
-
Event log of the Explicit Memory Management functionality
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:
-
In Windows
working-directory\ejb\server-name
-
In UNIX
working-directory/ejb/server-name
By default, the JavaVM log is output under the following directory:
-
In Windows
working-directory\ejb\server-name\logs
-
In UNIX
working-directory/ejb/server-name/logs
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.
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.
|
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:
|
Specify the following extension options based on the requirements and set the output methods and the output contents of the JavaVM log file:
-
File size and the number of JavaVM log files
-
Extended verboseGC function option
-
Extension function option when OutOfMemoryError occurs
-
Class library trace function option
-
Local variable information output function option
-
Asynchronous log file output function option, etc.
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.
|
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:
-
Settings for log output level
Set up the log output level to output a log depending on the purpose. You can specify the four log output levels; none, normal, verbose, and debug. Default level of J2EE server is normal. The log details are given in the order of none<normal<verbose<debug and the output volume increases.
For example, you can perform an operation, where you can specify normal for normal and verbose if an error occurs and can acquire a detailed log.
-
Settings for log output file
The log of Explicit Memory Management functionality is output to a separate file other than the JavaVM log. Set up the file for the output destination, file size, and number of files according to the assumed operation.
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.
|
Setting contents |
Option |
Description |
|---|---|---|
|
Setting of output level |
-XX:HitachiExplicitMemoryLogLevel:character-string |
Specify log output level.
|
|
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.
|
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.