Oracle GlassFish Server Reference Manual Release 3.1.2 Part Number E24938-01 |
|
|
View PDF |
creates a ZIP archive of all available log files
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 GlassFish Server 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.
--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).
The log files will be collected for the specified GlassFish Server instance.
The log files will be collected for the specified cluster and the DAS.
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.
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.
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.
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.
subcommand executed successfully
error in executing the subcommand
list-log-attributes(1), list-log-levels(1), rotate-log(1), set-log-attributes(1), set-log-levels(1)
"Administering the Logging Service" in Oracle GlassFish Server Administration Guide