2.3.3 Collecting the Snapshot Log
The log in which the status of the system when failure occurred is output by the component software of the system is called the snapshot log. The snapshot log contains the thread dump, trace based performance analysis, information necessary for system maintenance, and the information necessary for application maintenance and so on, in addition to the logs of the different types of component software. In a system built with the application server, this information can be collected together in the form of snapshot log and obtained as a log file in the ZIP format. The administrator can counter the errors by collecting and analyzing the snapshot log.
The settings are specified in such a way that the data necessary for troubleshooting is automatically collected by executing the failure detection command and collecting the snapshot log. To get the information not collected as per the default settings, in the form of the snapshot log, define the get destination of the data as the collection target of snapshot log. For details on the information that is not collected by default, see the description on the collectability of the snapshot log and the changing of collection-related settings in Appendix A. List of Snapshot Logs to Be Collected.
You can change the settings for the target of snapshot log collection, output destination directory, and the number of files, when building the system.
This subsection describes about the timing for collecting snapshot logs, the data that you can collect, and the flow of collection. Also, this subsection describes about collecting snapshot logs by using management commands as a way of collecting the snapshot logs at any time. Note that for the settings of snapshot log collection, see 3.3.3 Settings for collecting snapshot logs (Systems for executing J2EE applications) or 3.3.4 Settings for collecting snapshot log (Systems for executing batch applications).
- Organization of this subsection
(1) Timing for collecting snapshot logs
You can collect snapshot logs automatically or at a specific timing. The following table describes the timing for the collection of the snapshot log. Note that you can collect the snapshot logs in the host on which a logical server is running.
Category |
Collection timing |
---|---|
Collect automatically#1 |
Immediately before the logical server stops automatically due to an error#2 |
Just before automatically restarting the J2EE server or the batch server managed in the management domain#2 |
|
Immediately before the J2EE server or batch 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( For the execution method, see (4) Collecting snapshot logs using the management commands) |
- #1
-
When building a system you can change the settings for collecting snapshot logs at any of the following timings According to the default settings, the snapshot log is collected when the logical server stops.
- Before terminating the logical server
- Before restarting the J2EE server
- #2
-
The Management Server executes the failure detection command for collecting the snapshot log at this time.
- Reference note
-
You can collect the snapshot log at following timings:
-
When Collect button in Snapshot Log window in Start/Stop Logical Server of Management Portal is clicked#1
-
Executing the Snapshotlog command #2
- #1
-
You can collect snapshot logs on a J2EE server or a batch server on which the collection procedure is executed.
- #2
-
You can execute the command irrespective of whether Management Server is used.
For the snapshot log window, see 11.9.5 Collecting snapshot log of a J2EE server in the uCosminexus Application Server Management Portal User Guide. For the snapshotlog command, see snapshotlog (collect snapshot logs) in the uCosminexus Application Server Command Reference Guide.
-
(2) Data that can be collected as snapshot log
This section describes the data that you can collect as a snapshot log. The snapshot log includes the information required for system maintenance and application maintenance.
The data required for troubleshooting is classified as primary delivery data and secondary delivery data depending on the timing at which the data is delivered to the maintenance service. You can collect the primary delivery data and the secondary delivery data in snapshot logs. You can also use the snapshotlog command to collect the definition sending data.
-
Material that is of a file size that can be sent as an attachment to mail. You can send the data immediately to the maintenance service by using mail.
-
In addition to the primary delivery data, comparatively large size files are applicable. You must send large files separately to the maintenance service, since sending of large files takes more time than usual.
-
The data that collects only the definition files to investigate the errors in the definition file settings. The file is small and can be sent quickly to the maintenance personnel through a mail. Note that you can also collect this data by using the snapshotlog command even if Management Server and the J2EE server are not running.
- Important note
-
The definition information collected in the definition sending data might include the user ID and password.
The data to be collected as snapshot log can be changed with the settings of the snapshot log collection target definition files. For example, if you want to collect the information output by a command during error detection created by the user and if the settings are changed, such information will be added to the information to be collected. The snapshot log collection target definition file is set during system configuration.
You can confirm which information will be actually collected in the real environment from the following files:
-
The contents to be acquired as the primary delivery data are defined in this file.
The location for storing snapshotlog.conf is as follows:
-
In Windows
Application-Server-installation-directory\manager\config\snapshotlog.conf
-
In UNIX
/opt/Cosminexus/manager/config/snapshotlog.conf
-
-
The contents that are to be acquired as the secondary delivery data are defined in this file.
The location for storing snapshotlog.2.conf is as follows:
-
In Windows
Application-Server-installation-directory\manager\config\snapshotlog.2.conf
-
In UNIX
/opt/Cosminexus/manager/config/snapshotlog.2.conf
-
-
This file defines the content to be obtained as the definition sending data.
The location for storing snapshotlog.param.conf is as follows:
-
In Windows
Application-Server-installation-directory\manager\config\snapshotlog.param.conf
-
In UNIX
/opt/Cosminexus/manager/config/snapshotlog.param.conf
-
However, depending on how the file is specified in adminagent.properties (administration agent property file), there are cases when the information that can be collected differs.
For default settings, when a problem occurs the snapshot log acquired automatically includes the following information:
- Primary delivery data
-
-
Information under the directory defined to collect the primary delivery data for the snapshot log#1
-
Thread dump of a J2EE server#2
-
Installation information
-
OS status log
-
- Secondary delivery data
-
-
Trace based performance analysis#2
-
Information under the directory defined to collect the secondary delivery data for the snapshot log#1
-
Installation information
-
OS status log
-
- #1
-
For details about the snapshot logs to be collected, see Appendix A. List of Snapshot Logs to Be Collected.
- #2
-
You can collect this information when the settings are set to output a thread dump and trace based performance analysis by using the system provided commands that are to be executed when an error is detected.
- Reference note
-
Files that can be collected in the default state differ between the snapshot log that can be collected by using the snapshotlog command and the snapshot log that can be collected by using the management command (mngsvrutil) of the Management Server or other methods. The snapshot log that can be collected by using the management command (mngsvrutil) of the Management Server or other methods can collect installation information as well as OS status and logs in the default state. However, to collect such information by using the snapshotlog command, you need to edit the snapshot log collection target definition file specified when the command is executed and add the snapshot log collection destination.
An example of the information that can be collected by default and information that cannot be collected by default is as follows:
(a) Information that can be collected by default
An example of the information that can be collected by default is as follows:
- Information required for application maintenance
-
The message log and user log of Cosminexus Component Container are collected as the information required for application maintenance.
-
Cosminexus Component Container#
-
Cosminexus Component Transaction Monitor
-
Cosminexus Developer's Kit for Java
-
Cosminexus Performance Tracer
-
Cosminexus TPBroker
-
Cosminexus Web Services - Security
-
Cosminexus HTTP Server
Other than the above, Hitachi Trace Common Library log and program product information (in UNIX) are also collected.
# Also includes the SOAP application execution infrastructure information.
-
- Information required for application maintenance
-
The message log and user log of Cosminexus Component Container are collected as the information required for application maintenance.
The following information is also collected by default:
- Component Container-related information
-
- In Windows
-
All the items beneath Application-Server-installation-directory\CC\server\public
- In UNIX
-
All the items beneath /opt/Cosminexus/CC/server/public
Note that the default directories created when installing the component software are defined as the collection target for the snapshot log by default. Always change the collection destination when changing the log output destination.
(b) Information that cannot be collected by default
The information described below cannot be collected when operating with default settings. Perform the settings in such a way so that you can collect the information as and when required.
- In Windows
-
- Cosminexus Component Container
-
-
EAR/JAR file (if it cannot be deployed or imported)
-
- Microsoft IIS
-
The following data is acquired when integrated with Microsoft IIS.
-
C:\inetpub\logs (Specify the system drive in place of C:)
-
- OS
-
-
Set of the data related to the system monitor (see subsection 4.13)
-
Event log (application, system)
-
OS operation data
From the winmsd start-up window, extract the data from the Operation-Save As Text File menu (It may take 5 to 10 minutes).
-
- In UNIX
-
- Cosminexus Component Container
-
-
EAR/JAR file (if it cannot be deployed or imported)
-
- OS
-
-
OS operation data
-
(3) Flow of snapshot log collection
If trouble occurs on the logical server, a snapshot log collection service request is executed from Management Server for Administration Agent. The procedure of the process that is executed during snapshot log collection is as follows. Note that the executed process differs according to the settings.
-
Executing the failure detection command provided by the system
-
Executing the failure detection command created by a user
-
Collecting snapshot logs (primary delivery data)
-
Collecting snapshot logs (secondary delivery data)
Collection of snapshot logs might take more time than usual depending on the operating environment of the machine and status of failure occurrence (such as the status in which an unexpected error occurred). Therefore, you can set respective timeouts for these processes.
Note that you set a timeout for collection of snapshot logs in cases such as when excessive time is consumed for collecting snapshot logs due to the occurrence of an unexpected failure and the logical server is expected to be restarted on priority. If a timeout is set when collecting snapshot logs, the collection process is suspended forcefully and the information required for trouble shooting cannot be acquired.
(4) Collecting snapshot logs using the management commands
You can use the management command (mngsvrutil) to collect the snapshot log at any time, in addition to automatic collection.
Note that the type of information that can be acquired is the same as the snapshot log that is collected automatically in the case of problems. See (2) Data that can be collected as snapshot log.
For details about the log output destinations, see the value of adminagent.snapshotlog.log_dir key of adminagent.properties file (Administration Agent property file). The default output destination is the following directory.
-
In Windows
Log-output-directory-of-Manager\snapshot
-
In UNIX
Log-output-directory-of-Manager/snapshot
For collecting the snapshot log, specify the subcommand collect in the management command mngsvrutil and then execute. You can collect the snapshot log from the host specified with -t option.
The execution format and an example of executing the command are described below. In this example, collect both the primary delivery file and the secondary delivery file. In n, specify whether to collect the primary delivery data or secondary delivery data.
- Execution format
mngsvrutil -m Management-Server-host-name[:Port number]-u Management-user-ID -p Management-password -t host-name -k host collect snapshot n
- Execution example
mngsvrutil -m mnghost -u user01 -p pw1 -t host01 -k host collect snapshot 1 mngsvrutil -m mnghost -u user01 -p pw1 -t host01 -k host collect snapshot 2