3.3.16 Settings for Acquiring a Core Dump
This section describes the settings for acquiring core dumps in UNIX.
- Important note
-
Depending on the Linux specifications, the size information in the core file might be invalid.
- Organization of this subsection
(1) Setting the maximum size of core files
The maximum size of core files may be 0 depending on the operation environment of the system. In such cases, core dumps of processes cannot be acquired. Therefore, you need to set in advance the maximum size of core files to infinite. To set the maximum size of core files to infinite, specify the option in the JavaVM startup parameter in the Easy Setup definition file or the option definition file, or execute shell commands.
Note that the larger the memory pool size specified in the JavaVM startup parameter in the Easy Setup definition file or option definition file, the larger the core file size will be, so secure sufficient free disk space.
-
Setting up the option in the JavaVM startup parameter in the Easy Setup definition file
Define the JavaVM startup parameter in the <configuration> tag on a logical J2EE server (j2ee-server) in the Easy Setup definition file. The setting contents of a JavaVM startup parameter are as follows:
- <param-name> tag
-
add.jvm.arg
- <param-value> tag
-
-XX:+HitachiFullCore
Setup example (For definition of the physical tier)
<configuration> <logical-server-type>j2ee-server</logical-server-type> <param> <param-name>add.jvm.arg</param-name> <param-value>-XX:+HitachiFullCore</param-value> </param> : </configuration>
-
Setting up the option in the JavaVM startup parameter in the option definition file
Define the JavaVM startup parameter in the option definition file.
Setup example (For the option definition file for Management Server)
add.jvm.arg=-XX:+HitachiFullCore
-
To execute shell commands
Execute the shell command and specify the maximum size of the core file as infinite.
Execution example of Csh (C shell)
limit coredumpsize unlimit
Execution example of sh (standard shell)
ulimit -c unlimited
Also, in addition to these settings, we recommend that you execute the shell commands to set the maximum file size to unlimited.
-
Example of execution for csh (C shell)
limit filesize unlimit
-
Example of execution for sh (standard shell)
ulimit -f unlimited
- Reference note
-
Formula for estimating the core file size
The core file size, generated when a JavaVM process is down, is equal to the amount of virtual memory used. For details on the formula for the virtual memory usage, see the following manuals. The disk, which contains the current directory of the JavaVM process where the core file is generated, must always have free space greater than this core file size.
-
For the J2EE application execution platform
5.3 Estimating memory used for each process in the uCosminexus Application Server System Design Guide
-
For the batch application execution platform
6.3 Estimating virtual memory usage in the uCosminexus Application Server System Design Guide
-
For Management Server and Administration Agent
5.3 Estimating memory used for each process in the uCosminexus Application Server System Design Guide and the standard memory requirements used by Cosminexus Component Container in the Release Notes.
-
(2) Setting the maximum number of files for core files
-
You can define the upper limit for the number of core files of a logical J2EE server in the ejb.server.corefilenum parameter in the <configuration> tag of j2ee-server in the Easy Setup definition file. Define the ejb.server.corefilenum parameter in the extension parameter of the J2EE server.
If the total number of core dump files output to working-directory/ejb/server-name/ during the restart of the cjstartsv process exceeds the specified maximum number, the files are deleted in the order of output date, starting from the oldest file.
-
You can define the upper limit for the number of core files of Management Server in the ejb.server.corefilenum parameter in the option definition file for Management Server.
If the total number of core dump files output to Application-Server-installation-directory/manager/containers/m/ejb/server-name-of-Management-Server/ during the restart of the Management Server process exceeds the specified maximum number, the files are deleted in the order of output date, starting from the oldest file.