8.7.5 hcmdsgetlogs (collecting log information)
Description
This command collects log information recorded during JP1/AO operation to output the information to the archive file.
Syntax
hcmdsgetlogs /dir output-folder-path [/types Automation] [/arc archive-file-name] [/logtypes {log | db | csv}]
Arguments
- /dir output-folder-path
-
This option specifies the path to the folder in which the archive file is output. A folder on the local disk drive can only be specified.
You must specify the absolute or relative path to an empty folder for output-folder-path. If the specified folder path does not exist, then that folder is newly created.
The maximum length of the path name is 100 characters. The system grants write permission to the folder specified by this option.
- /types Automation
-
This option specifies Automation as the name of the product whose log information is to be collected. This option is not case sensitive. If this option is omitted, the command has an effect on JP1/AO and all the installed Hitachi Command Suite products. In this case, it might take longer to collect log information.
- /arc archive-file-name
-
This option specifies the name of the archive file created as a result of execution of the data collection tool for Common Component. If this option is not specified, the file is named in the format of HiCommand_log-file-type.jar.
The archive file is output under the folder specified in the /dir option.
The possible characters for the archive file name are printable ASCII characters (ranged from 0x20 to 0x7E in the ASCII code) except for some of the special characters (\, /, :, ,, ;, *, ?, ", <, >, |, $, %, &, ', and `). The extension is not necessary.
- /logtypes {log | db | csv}
-
This option specifies the type of a log file for Common Component that you want to collect. The following table lists the relationship between the log file type and the log files that can be collected.
Table 8‒10: Log file type and log files that can be collected Log file type
Log file that can be collected
log
-
archive-file-name-specified-in-the-/arc-option.jar
-
archive-file-name-specified-in-the-/arc-option.hdb.jar
db
archive-file-name-specified-in-the-/arc-option.db.jar
csv
archive-file-name-specified-in-the-/arc-option.csv.jar
If this option is omitted, the system collects all the log files for Common Component. Because of this, we recommend that you execute the command without this option.
You can specify multiple log file types by entering them separated by half-width space characters such as /logtypes log db csv. If you use the /types and /logtypes options at the same time, you must specify log for the /logtypes option.
-
Output format
The following table shows the list of data collected by the command. The hcmdsgetlogs command outputs its log file to output-folder-specified-in-the-/dir-option\RAS_SCRIPT.log.
Archive file |
Output result |
Description |
---|---|---|
output-folder-specified-in-the-/dir-option\Automation_1st_log.jar |
|
All public log files |
output-folder-specified-in-the-/dir-option\Automation_log.jar |
|
The contents and output formats of the files are not made public. |
output-folder-specified-in-the-/dir-option\AJS_log.jar |
Results of the data collection tool for the task-processing engine |
|
output-folder-specified-in-the-/dir-option\archive-file-name-specified-in-the-/arc-option.jar |
Results of the data collection tool for Common Component (hcmdsgetlogs and hcmdsras) |
|
output-folder-specified-in-the-/dir-option\archive-file-name-specified-in-the-/arc-option.hdb.jar |
Results of the data collection tool for Common Component (hcmdsgetlogs) |
|
output-folder-specified-in-the-/dir-option\archive-file-name-specified-in-the-/arc-option.db.jar |
Results of the data collection tool for Common Component (hcmdsgetlogs) |
|
output-folder-specified-in-the-/dir-option\archive-file-name-specified-in-the-/arc-option.csv.jar |
Results of the data collection tool for Common Component (hcmdsgetlogs) |
- #1:
-
The Windows-folder is defaulted to C:\WINDOWS.
- #2:
-
The ProgramFiles(x86)-folder is defaulted to C:\Program Files (x86).
Located in
Common-Component-installation-folder\bin
Execute permission
Execute the command as a user with Administrator permissions.
Remarks
-
Do not interrupt this command while it is running.
-
If the hcmdsgetlogs command is interrupted, this command has terminated before this command completed due to insufficient free space in the folder specified in the /dir option. In this case, make sure that the folder has enough free space, and then execute this command again.
-
Do not execute more than one hcmdsgetlogs command at the same time.
-
When JP1/AO is running in a cluster configuration, execute this command on both the active host and standby host.
-
If the same option is specified more than once, only the first option is effective.
Return code
The following table lists the return codes from the command.
Return code |
Description |
---|---|
0 |
The command succeeded. |
1 |
The argument is invalid. |
2 |
The command terminated abnormally. |
Example
The following command shows an example of how to collect log information in the specified folder:
hcmdsgetlogs /dir "C:\Users\folder01" /types Automation /arc AO_log
Related topic