type=page status=published title=collect-log-files next=configure-jms-cluster.html prev=change-master-password.html ~~
Creates a ZIP archive of all available log files
asadmin [asadmin-options] collect-log-files [--help]
[--target target]
[--retrieve={false|true}] [retrievefilepath]]
The collect-log-files
subcommand collects all available log files for
the domain administration server (DAS), the specified cluster, or the
specified {productName} 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.
- asadmin-options
-
Options for the
asadmin
utility. For information about these options, see theasadmin
(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 tofalse
. 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 {productName} instance.
- cluster-name
-
The log files will be collected for the specified cluster and the DAS.
- 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 isfalse
, this operand is ignored.
This example generates a ZIP archive from the log files for the default server.
asadmin> collect-log-files
Created Zip file under /space/gf/glassfish8/glassfish/domains/domain1/\
collected-logs/log_2021-12-15_15-46-23.zip.
Command collect-log-files executed successfully.
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/gfv/glassfish8/glassfish/domains/domain1/\
collected-logs/log_2021-12-15_15-54-06.zip.
Command collect-log-files executed successfully.
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.
"Administering the Logging Service" in {productName} Administration Guide