Hitachi

Hitachi Application Server V10 Command Reference Guide (For Windows® Systems)


2.10.2 collect-snapshot

The collect-snapshot subcommand collects system information when the domain administration server starts.

Synopsis

asadmin [asadmin_options] collect-snapshot
    [--infotype info_type1[,info_type2]...]
    --targettype={domain|node|server}
    [--targetname target_name1[,target_name2]...] [--timeout timeout]

Storage location

Application Server installation directory\javaee\glassfish\bin

Function

The collect-snapshot subcommand collects the system information of the products that configure Application Server. The collection is performed on multiple hosts where the nodes and the servers that are used to configure the domain exist. The collected information is output to the hosts as system information archive files.

If there is a forced termination during the execution of the subcommand, the following files and directories may remain in the output destination directory of the system information archive files.

As you can set the maximum value for the number of system information archive files to be generated in the output destination directory, the ".zip" file will not remain. Delete the other files and directories as needed. Before deleting, check the message log to confirm that the collect-snapshot and collect-local-snapshot subcommands are not running.

Important note
  • The thread dump file is generated each time the collect-snapshot subcommand is run. If the thread dump file is not required, delete the file after running the subcommand. By default, the thread dump file is saved in the current directory. The current directory of the domain administration server is Application Server installation directory/javaee/glassfish/domains/domain_name/config, and the current directory of the Java EE server is Application Server installation directory/javaee/glassfish/nodes/node_name/server_instance_name/config.

  • If the output destination of the thread dump file is changed from the current directory, the thread dump file is not included in the system information archive file.

  • If the system information collection process is interrupted by a timeout, the execution of the collect-snapshot subcommand, which is internally called, is also interrupted. However, if the internal process (collect-snapshot subcommand) has called another process, the collect-snapshot subcommand process might not be interruptible.

  • If the host where the domain administration server exists is unable to communicate with a host, make sure that the node and the server that exist in the host are excluded from the collection targets, and then run the collect-snapshot subcommand.

Execution permission

Standard user account

Precondition

Arguments

--infotype info_type1[,info_type2]...

Specifies the type of system information to be collected. You can specify multiple types separated by a comma.

Type: String

You can specify the following values:

  • initinfo

    Collects the system information for initial verification, which is the minimum requirement to eliminate a problem.

  • sysinfo

    Collects all the system information required for verifying the cause. It also includes the system information required for the initial verification.

Default value: initinfo,sysinfo

--targettype={domain|node|server}

Specifies the target for collecting the system information.

Type: String

You can specify the following values:

  • domain

    Collects the system information of all the servers that configure the domain. The value specified in the --targetname option is not used.

  • node

    Collects the system information of all the servers that configure the node specified in the --targetname option.

  • server

    Collects the system information of the servers (Java EE, Web, or PRF servers) specified in the --targetname option.

Default value: (None)

--targetname target_name1[,target_name2]...

Specifies the name of the server or node that collects the system information. You can specify multiple names separated by a comma.

If domain is specified in --targettype option, the specified values for this option are not used.

Type: String

You can specify the following values:

  • Node name or server name.

Default value: server

--timeout timeout

Specifies the time period required for the collect-local-snapshot subcommand called by this subcommand to stop the collection of system information and finish the command execution.

If the collection of the system information stops, an incomplete system information archive file might remain in the output destination directory. In this case, delete the file as needed.

Type: Integer

You can specify the following values:

  • 1 to 2147483647

Default value: (None. The collect-local-snapshot subcommand does not time out.)

Examples

The following example collects the system information of all the servers configured in the domain:

asadmin collect-snapshot --targettype=domain

Exit Status

Exit Status

Explanation

0

Normal termination.

1

Abnormal termination.

Output Format

This subcommand collects the system information specified in the --infotype option and creates the system information archive file corresponding to each target. The naming convention of the system information archive file is as follows:

snapshot-info_type#1-collection_target_name#2-date_and_time#3-process-id#4-thread-id#5.zip
#1

The value specified in the --infotype option. If multiple values are specified, multiple system information archive files that correspond to the specified values are generated.

#2

This is domain_name if the file is output to a host where the domain administration server exists. This is domain_name_host_name if the file is output to a node where the domain administration server does not exist.

#3

The format is yyyyMMddHHmmss. If a node or server that exists on multiple hosts is specified in the --targetname option, the date and time of the file name to be saved in each host changes to the date and time when the collect-snapshot subcommand was executed.

#4

process-id is process id (Hexadecimal) of the domain administration server.

#5

thread-id is thread id (Hexadecimal) of collect-snapshot subcommand.

The system information archive file is saved in the following directory in the host where the server specified by the --targetname option exists:

Application Server installation directory/javaee/snapshot

The following properties of the set and get subcommands of the asadmin utility can be used to set and verify the location of the output destination directory and the number of system information archive files to be generated in the output destination directory.

#:

If you do not have access to the specified output destination directory, an error message (KDKD10211-E) is output and the collection of system information stops.

For details on properties, see List of parameters used with the set and get subcommands.