4.2.11 Functionality of maintenance information collection (hwscollect command)
When the Web server terminates abnormally and does not respond, the maintenance personnel requires documents like core dump, error log, and access log to check the cause of failure. You can collect the documents required to check the failure by the hwscollect command, in a single batch. The hwscollect command is valid only on UNIX version.
You need to execute the hwscollect command with root permission.
- Organization of this subsection
(1) Format
hwscollect directory-where-the-collection-information-is-output [-f definition-file-name]
(2) Parameters
-
directory-where-the-collection-information-is-output
This parameter specifies the directory where the collected information is output as a tar archive file.
Name of the archive file is HWSyyyymmddhhmmss.tar. Here, yyyymmdd is the date when you start hwscollect, and hhmmss is the local time limited to 24 hours from the start of hwscollect.
-
-f definition-file-name
This parameter specifies the hwscollect.conf file. Specify with an absolute path or relative path from the current directory.
(3) How to use
The following is the method to use this utility when HTTP Server is installed with a standard configuration:
/opt/hitachi/httpsd/maintenance/hwscollect /tmp
(4) Setting the configuration file
Define the operations of hwscollect in hwscollect.conf file. Delimit the keywords and the value with a space, and code the hwscollect.conf. Note that the keywords are not case sensitive. Line which begins with a # symbol is a comment. Specify all the file names with an absolute path. The following table describes the specifications and keywords of configuration file:
|
Keyword |
Value to be specified |
Specification |
Multiple specifications |
Wild card |
|---|---|---|---|---|
|
ServerRoot |
Specify the ServerRoot directive value of httpsd.conf. |
Mandatory |
N |
N |
|
conf |
Specify the file name of httpsd.conf. |
Mandatory |
N |
N |
|
trcinfo |
Specify the directory in which hwstraceinfo command exists. |
Mandatory |
N |
N |
|
trcid |
Specify the file name specified in the HWSTraceIdFile directive of the httpsd.conf. |
Mandatory |
N |
N |
|
PidFile |
Specify the file name specified in the PidFile directive of httpsd.conf. |
Mandatory |
N |
N |
|
CORE |
Specify the CoreDumpDirectory directive value and SSLCacheServerRunDir directive value of httpsd.conf. |
Optional |
Y |
Y |
|
LOG |
Specify the file name that specifies the log in the ErrorLog directive, the TransferLog directive, and the CustomLog directive, which are in httpsd.conf. |
Optional |
Y |
Y |
|
FILES |
Specify any other file useful for defect analysis in addition to the above-mentioned files. |
Optional |
Y |
Y |
- Legend:
-
Y: Can specify.
N: Cannot specify.
(5) Example to specify a configuration file
The following is an example of configuration file specification:
ServerRoot /opt/hitachi/httpsd conf /opt/hitachi/httpsd/conf/httpsd.conf trcinfo /opt/hitachi/httpsd/sbin/ trcid /opt/hitachi/httpsd/logs/hws.trcid PidFile /opt/hitachi/httpsd/logs/httpd.pid CORE /opt/hitachi/httpsd/logs/core* LOG /opt/hitachi/httpsd/logs/error* LOG /opt/hitachi/httpsd/logs/access* LOG /opt/hitachi/httpsd/logs/hws.trclog* LOG /opt/hitachi/httpsd/logs/hwsrequest*
(6) Disk usage
-
File for temporary usage
200 KB + (7 KB × MaxClients value)
-
tar file to output collected information
core file size + log file size + temporary file size
(7) Notes
-
Reserve some empty space in the directory where the collected information is output, as the maintenance information archive file that includes the core file will be created in the directory.
-
Create the output file and the temporary file in the directory where the collected information is output. Set the directory as writable where the collected information will be output.
-
If you specify a directory for CORE, LOG, and other FILES, all the files are collected under this specified directory. You need to take care if you specify a top-level directory such as the root directory, as the directory may collect a large volume of unnecessary information.