collect-log-files

Previous Next Contents

collect-log-files

creates a ZIP archive of all available log files

Synopsis

asadmin [asadmin-options] collect-log-files [--help]
[--target target]
[--retrieve={false|true}] [retrievefilepath]]

Description

The collect-log-files subcommand collects all available log files for the domain administration server (DAS), the specified cluster, or the specified \{product---name} instance and creates a single ZIP archive of the log files. If a cluster is specified, the ZIP archive also contains the log file for the DAS.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--retrieve

Specifies whether the ZIP archive is created in a directory other than the default directory.
By default the ZIP archive is created in the domain-dir`/collected-logs` directory. The ZIP file names are constructed from the specified target and timestamp, as follows:

log_yyyy-mm-dd_hh-min-sec.zip

Possible values are as follows:

false

The ZIP archive will be created in the default directory. If omitted, the --retrieve option defaults to false.

true

The ZIP archive will be created in the directory that the retrievefilepath operand specifies. If retrievefilepath is omitted, the ZIP archive will be created in the default directory.

--target

Specifies the target for which log files will be collected.
Possible values are as follows:

server

The log files will be collected for the DAS (default).

instance-name

The log files will be collected for the specified \{product---name} instance.

cluster-name

The log files will be collected for the specified cluster and the DAS.

Operands

retrievefilepath

The name of the directory in which the ZIP archive will be created. If this operand is omitted, the ZIP archive will be created in the default directory. If the --retrieve option is false, this operand is ignored.

Examples

Example 1   Collecting Log Files for the Default Server

This example generates a ZIP archive from the log files for the default server.

asadmin> collect-log-files
Created Zip file under /space/gfv3/v3setup/glassfish3/glassfish/domains/domain1/\
collected-logs/log_2010-12-15_15-46-23.zip.
Command collect-log-files executed successfully.

Example 2   Collecting Log Files for a Cluster

This example generates a ZIP archive from the log files for a cluster named cluster1 and the two server instances running in the cluster.

asadmin> collect-log-files --target cluster1
Log files are downloaded for instance1.
Log files are downloaded for instance2.
Created Zip file under /space/gfv3/v3setup/glassfish3/glassfish/domains/domain1/\
collected-logs/log_2010-12-15_15-54-06.zip.
Command collect-log-files executed successfully.

Example 3   Collecting Log Files in a Directory Other Than the Default for a Cluster

This example generates a ZIP archive from the log files for a cluster named cluster1 and its two server instances, and saves the archive in a directory named /space/output.

asadmin> collect-log-files --target cluster1 --retrieve true /space/output
Log files are downloaded for instance1.
Log files are downloaded for instance2.
Created Zip file under /space/output/log_2010-12-15_15-55-54.zip.
Command collect-log-files executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

See Also

"Administering the Logging Service" in GlassFish Server Open Source Edition Administration Guide


Previous Next Contents
Eclipse Foundation Logo  Copyright © 2019, Oracle and/or its affiliates. All rights reserved.