Hitachi

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


2.10.1 collect-local-snapshot

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

Synopsis

asadmin [asadmin_options] collect-local-snapshot
    [--infotype info_type1[,info_type2]...]
    [--domaindir domain_root_dir]
    [--domain domain_name] [--nodedir node_root_dir]
    --targettype={node|server}
    [--targetname target_name1[,target_name2]...]
    [--archivefile archive_file] [--timeout timeout]

Storage location

Application Server installation directory\javaee\glassfish\bin

Function

The collect-local-snapshot subcommand collects the system information of the products that configure Application Server. The collected information is output as a system information archive file.

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-local-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-local-snapshot subcommand, which is internally called, is also interrupted. However, if the internal process (collect-local-snapshot subcommand) has called another process, the collect-local-snapshot subcommand process might not be interruptible.

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

--domaindir domain_root_dir

Specifies the absolute path of the domain root directory. If the domain root directory was not changed from the default value of Application Server or if the subcommand is run on a host in which the domain administration server does not exist, you can ignore this option.

Type: String

You can specify the following values:

  • Absolute path of the domain root directory

Default value: Application Server installation directory/javaee/glassfish/domains

--domain domain_name

If a node or server of the same name exists in multiple servers, specify the name of the domain that includes the node or server from which system information should be collected. If not, you can omit this.

If multiple domains have the name specified in this option, and if all the domains have a server of the same name specified in the --targetname option, system information of all the servers whose domain names and server names are identical is collected.

Type: String

You can specify the following values:

  • Domain name

Default value: (None)

--nodedir node_root_dir

Specify the absolute path of the node root directory on which a server (the Java EE server, the web server, or PRF) is created. If the node root directory in which the server is created was not changed from the default value of Application Server or if the subcommand is run on a host in which the domain administration server does not exist, you can ignore this option.

This option can be used to specify only one node root directory. To retrieve system information of nodes or servers under different node root directories, run the collect-local-snapshot subcommand in each of the node root directories.

Type: String

You can specify the following values:

  • Absolute path of the node root directory

Default value: Application Server installation directory/javaee/glassfish/nodes

--targettype={node|server}

Specifies the target for collecting the system information.

Type: String

You can specify the following values:

  • node

    Collects the system information of all the servers configured in 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.

Type: String

You can specify the following values:

  • Node name or server name

Default value: server

--archivefile archive_file

Specifies the character string at the end of the system information archive file name. The format of the file name is as follows:

snapshot-info_type-archive_file

info_type: The value specified in the --infotype option.

archive_file: The value specified in the --archivefile option.

When multiple values are specified in the --infotype option, the subcommand creates the system information archive file corresponding to each specified value.

If a file with the same name exists in the destination directory of system information archive file, then the existing file is overwritten.

Type: String

You can specify the following values:

  • String attached at the end of the system information archive file

    You can use the following single byte characters.

    Lower-case letters

    Upper-case letters

    Numbers

    Hyphen

    Period

    Underscore

Default value: domain-name-date-process-id-thread-id.zip

date is in the yyyyMMddHHmmss format.

process-id is process id (Hexadecimal) of collect-local-snapshot subcommand.

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

--timeout timeout

Specifies the time-out period that the collect-local-snapshot subcommand suspends the process of collecting the system information and terminates 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 the server with the name server:

asadmin collect-local-snapshot --targettype=server

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.

For details on the name of the system information archive file, refer to the explanation about the --archivefile option.

The system information archive file is output to the following directory in the host where the subcommand is executed:

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.