3.3.3 Settings for collecting snapshot logs (Systems for executing J2EE applications)
This subsection describes the settings for collecting snapshot logs. You can change the settings of the files that are collected as snapshot log and storage destination of the collected snapshot logs.
- Organization of this subsection
(1) Data that you can collect for each snapshot log collection timing
The following table describes the settings to change the method to collect the snapshot logs according to the collection timing.
Category |
Collection timing |
Settings required to change the default settings |
---|---|---|
Automatic collection# |
Immediately before the automatic termination when the logical server fails |
|
Immediately before the automatic restart when the J2EE server fails |
||
Immediately before the J2EE server is restarted manually in a batch |
|
|
Collect at the specified timing |
When the management command (mngsvrutil) of the Management Server is executed to collect the snapshot log |
- #
-
You can change the timing of collection of snapshot logs to before terminating the logical server or before restarting the J2EE server in the com.cosminexus.mngsvr.snapshot.collect.point key of mserver.properties. According to the default settings, the snapshot log is collected when the logical server stops.
The following points describe the data that you can collect according to the collection timing.
(a) Automatic collection
When the snapshot log is automatically collected at either of the following times, the Management Server executes the failure detection time commands, and the material such as thread dumps and trace based performance analysis are acquired:
-
Immediately before automatic termination when the logical server fails (default settings)
-
Immediately before the automatic restart when the J2EE server fails
You can collect the material collected using the failure detection time commands as the snapshot log. For details about changing operations and settings of the failure detection time commands, see 3.3.1 Data acquisition settings using failure detection time commands (Systems for executing J2EE applications).
(b) Any time collection
You can collect the snapshot log at any time only when thread dump files and user dumps (in Windows) or core dumps (in UNIX) are output. When collecting the snapshot log at any time, thread dump files and user dumps or core dumps are not output when the command is executed.
To collect the snapshot log at any time by executing the operation management commands (mngsvrutil) of the Management Server, you can specify the type of collection destination (type 1 or type 2) when executing the command to collect the snapshot log. When collecting at other times, all files defined as collection targets of type 1 and type 2 are collected.
(2) Files that can be collected in a snapshot log
The troubleshooting data is classified into primary delivery data and secondary delivery data according to the time at which the data is sent to the maintenance personnel. You can collect the primary and secondary delivery data in snapshot log. For each type of data, see 2.3.3(2) Data that can be collected as snapshot log.
Specify the file to be collected as primary delivery data in the snapshot log collection definition file (snapshotlog.conf) of primary delivery data. When collecting the snapshot log, if you specify the argument snapshot 1 in the mngsvrutil command, files specified in snapshotlog.conf are collected. Specify the files to be collected as secondary material in the snapshot log collection target definition file (snapshotlog.2.conf) of secondary delivery data. When collecting the snapshot log, if you specify the argument snapshot 2 in the mngsvrutil command, files specified in snapshotlog.conf and snapshotlog.2.conf are collected.
When you want to collect the files that are not defined as the snapshot log collection destination by default as the snapshot log, add the output destination of those files to the snapshot log collection target definition file. The following settings may also be required depending on the material:
-
Settings to acquire the material before starting an operation
You need to make the settings for collecting the material before starting the operation.
-
Acquiring the material using commands
Before collecting as the snapshot log, you need to execute commands to acquire the material targeted for collection. For details about data acquisition, see 4. Output Destinations and Output Methods of Data Required for Troubleshooting.
- (Examples)
-
-
In Windows
Before starting the operation, you need to set the environment variable (CJMEMDUMP_PATH) for user dumps. If you set the environment variable (CJMEMDUMP_PATH), you need to change the collection destination of the snapshot log.
-
In UNIX
Before starting the operation, you need to set the core file size for core dumps. We recommend that you specify the settings for collection before starting the operation, and then obtain core dumps when an error is detected by using the user-created failure detection time commands, and collect the core dumps as the snapshot log. The default output destination of core dumps is specified in the default snapshot log collection target definition file.
For details about settings of the collection to be implemented before starting the operation, see 3.3.15 Settings for Collecting a User Dump or 3.3.16 Settings for Acquiring a Core Dump. For details about the failure detection time commands created by user, see 3.3.1 Data acquisition settings using failure detection time commands (Systems for executing J2EE applications).
-
For specifying snapshotlog.conf and snapshotlog.2.conf, see 3.3.3(3) Customizing the snapshot log collection destination. For details about the data to be collected as the primary delivery data and the secondary delivery data as per the default settings, see Appendix A. List of Snapshot Logs to Be Collected.
(3) Customizing the snapshot log collection destination
You can customize the snapshot log collection target definition file as the snapshot log collection destination. You can also use adminagent.properties to specify the number of files of the snapshot log for each logical server. For details about the file, see 10.2.1 Definition file for snapshot log collection in the uCosminexus Application Server Definition Reference Guide.
(a) Specifying the snapshot log collection destination
Edit the snapshot log collection target definition file and specify the collection destination for the snapshot log. The storage location of the file listing the files targeted as the snapshot log collection target definition file is as follows:
-
In Windows
Cosminexus-installation-directory\manager\config\snapshotlog.conf
Cosminexus-installation-directory\manager\config\snapshotlog.2.conf
-
In UNIX
/opt/Cosminexus/manager/config/snapshotlog.conf
/opt/Cosminexus/manager/config/snapshotlog.2.conf
Specify the destination directory to be collected files as the Primary delivery data in snapshotlog.conf. Also, specify the destination directory to be collected files as the secondary delivery data in snapshotlog.2.conf.
In snapshot log collection target definition file, you can use a variable for the collection path. For example, if "${cosminexus.home}/manager/log/.+" (period (.) represents optional character, and plus (+) represents more than 1 time) is specified for the snapshot log collection target definition file by using "${cosminexus.home}" variable that represents Cosminexus installation directory, all files under Cosminexus-installation-directory/manager\log (in Windows) or /opt/Cosminexus/manager/log directory (in UNIX) are collected. Do not include the dollar sign ($) in the variable value of the snapshot log collection target definition file.
(b) Specifying the number of snapshot log files
You can use the following keys of adminagent.properties to change the number of snapshot log files for each logical server. Default setting is 10. For adminagent.properties, see 8.2.1 adminagent.properties (Administration Agent property file) in the uCosminexus Application Server Definition Reference Guide.
-
adminagent.snapshotlog.num_snapshots
Specify the number of snapshot log files to be collected as the primary delivery data for each logical server.
-
adminagent.snapshotlog.listfile.2.num_snapshots
Specify the number of snapshot log files to be collected as the secondary delivery data for each logical server.
(c) Specifying storage destination for the snapshot log
You can change the storage destination of the information that is automatically collected by snapshot log collection by using the adminagent.snapshotlog.log_dir key of adminagent.properties. By default, the information is stored at the following locations:
-
In Windows
Log-output-folder-of-Manager\snapshot
-
In UNIX
Log-output-directory-of-Manager/snapshot
For adminagent.properties, see 8.2.1 adminagent.properties (Administration Agent property file) in the uCosminexus Application Server Definition Reference Guide.
(4) Setting snapshot log collection timeout
You can set the timeout for the processes that are executed when collecting the snapshot log. Set the timeout in mserver.properties. The following table shows the processes that are executed when collecting snapshot logs and their timeouts.
Process |
Timeout settings (mserver.properties key) |
Explanation |
---|---|---|
Execution of the failure detection time command provided by the system |
com.cosminexus.mngsvr.sys_cmd.abnormal_end.timeout |
Shows the time that the program waits till each of the following processes ends:
|
Execution of the failure detection time command created by the user |
com.cosminexus.mngsvr.usr_cmd.abnormal_end.timeout |
Shows the time the program waits till the user created failure detection time command ends. If the command does not end even after the specified time has elapsed, ignore the executed command and continue the process. |
snapshot log (primary delivery data) collection |
com.cosminexus.mngsvr.snapshot.auto_collect.timeout |
Shows the time the program waits till the collection of primary and secondary delivery data ends. If the collection does not end even after the specified time has elapsed, a service request for canceling the snap log collection is sent from Management Server to Administration Agent, and a KEOS20052-E message is output in the Management Server log. |
snapshot log (secondary delivery data) collection |
For mserver.properties, see 8.2.6 mserver.properties (Management Server environment settings file) in the uCosminexus Application Server Definition Reference Guide.