ajslogprint
- Organization of this page
Format
ajslogprint [-b output-start-day] [-e output-end-day] [-k log-type] [-F service-name] [-u unit-name] [-m message-ID] scheduler-log-file-name
Description
The ajslogprint command extracts log records that match the specified conditions from the scheduler log, and outputs the extracted log records.
Execution privileges
None
Arguments
-b output-start-day
Specify the start day of the range (term) for which you want to output log records.
You can specify the day in [YYYY/]MM/DD format.
-
YYYY
Specify a numeric value from 1994 to 2036 as the year. If you omit this element, the year that the command is executed is assumed.
-
MM
Specify a numeric value from 1 to 12 (or 01 to 12) as the month.
-
DD
Specify a numeric value from 1 to 31 (or 01 to 31) as the day.
If this option is specified, the command does not extract the log records output when no is specified for the AJSLOGOUTPUTYEAR or HOSTLOGOUTPUTYEAR environment setting parameter (log records that do not include year information).
If this option is omitted, the start of the output range is set to the beginning of the log.
-e output-end-day
Specify the end day of the range (term) for which you want to output log records.
You can specify the day in [YYYY/]MM/DD format.
-
YYYY
Specify a numeric value from 1994 to 2036 as the year. If you omit this element, the year that the command is executed is assumed.
-
MM
Specify a numeric value from 1 to 12 (or 01 to 12) as the month.
-
DD
Specify a numeric value from 1 to 31 (or 01 to 31) as the day.
If this option is specified, the command does not extract the log records output when no is specified for the AJSLOGOUTPUTYEAR or HOSTLOGOUTPUTYEAR environment setting parameter (log records that do not include year information).
If this option is omitted, the end of the output range is set to the end of the log.
-k log-type
Specify the log type.
For the log types that can be specified, see C.1 Log entries output by the scheduler services in the manual Job Management Partner 1/Automatic Job Management System 3 Troubleshooting.
If this option is omitted, all types of log records are subject to output.
-F service-name
Specify the name of the scheduler service for which you want to output log records.
You can specify a character string of 1 to 30 bytes.
If this option is omitted, log records for all scheduler services are subject to output.
-u unit-name
Specify the full path name of the unit for which you want to output log records.
You can specify a character string of 1 to 930 bytes.
Note that the log records for only the specified unit are subject to extraction. The log records for subordinate units of the unit are not subject to extraction. Also note that if this option is specified, the command does not search A001 to A003 (service startup logs).
If this option is omitted, log records for all units are subject to output.
-m message-ID
Specify a message ID if you want to output log records that contain the message ID.
You can specify a character string of 1 or 10 bytes.
To output only the log records that report normal termination of an operation from log types C001 to C512 (containing messages whose ID begins with C), specify 0.
To output log records that contain a specific message, specify the ID of the message in KAVSxxxx-Z format.
If this option is omitted, log records containing any message are subject to output.
scheduler-log-file-name
Specify a scheduler log file name.
You can specify a character string of 1 to 255 bytes.
You can specify only one scheduler log file name.
Notes
-
If the -k, -F, -u, and -m options are specified, the conditions specified for these options are combined as an AND search.
-
You cannot use a regular expression to specify service names, unit names, message IDs, or scheduler log file names.
-
If you want to extract log records across two scheduler log files, merge these files into one file, and then execute the command.
-
If a log record in an incorrect format is found, output the KAVS0476-E message, and resume the processing from the next line.
Arguments that can be specified when executing the command from JP1/AJS3 - View
You can specify the following arguments when executing the ajslogprint command from JP1/AJS3 - View:
No. |
Arguments |
Required? |
---|---|---|
1 |
-b output-start-day |
-- |
2 |
-e output-end-day |
-- |
3 |
-k log-type |
-- |
4 |
-F service-name |
Y |
5 |
-u unit-name |
-- |
6 |
-m message-ID |
-- |
7 |
scheduler-log-file-name |
Y |
- Legend:
-
Y: Required
--: Optional
You cannot specify any other options when executing the ajslogprint command from JP1/AJS3 - View.
For details about how to execute JP1/AJS3 commands from JP1/AJS3 - View, see 10.4 Executing JP1/AJS3 commands from JP1/AJS3 - View in the Job Management Partner 1/Automatic Job Management System 3 Operator's Guide.
Return values
0 |
Normal end. |
4 |
Any of the following results:
|
12 |
Insufficient memory |
24 |
The specified scheduler log file cannot be accessed. |
36 |
An error occurred while the scheduler log file is being loaded. |
120 |
A critical error occurred (system call error). |
Example 1
In this example, the command extracts and outputs log records related to all operations for /net1 in the period from October 1, 2010 to March 31, 2011 from the scheduler log of the scheduler service AJSROOT1.
- In Windows:
ajslogprint -b 2010/10/01 -e 2011/03/31 -u /net1 "C:\Program Files\HITACHI\JP1AJS2\log\schedule\AJSROOT1\ajs-log1.log"
- In UNIX:
ajslogprint -b 2010/10/01 -e 2011/03/31 -u /net1 /var/opt/jp1ajs2/log/schedule/AJSROOT1/ajs-log1.log
Example 2
In this example, from the scheduler log of the scheduler service AJSROOT1, the command extracts and outputs log records related to unit creation (C304) in the period from October 1, 2010 to March 31, 2011.
- In Windows:
ajslogprint -b 2010/10/01 -e 2011/03/31 -k C304 "C:\Program Files\HITACHI\JP1AJS2\log\schedule\AJSROOT1\ajs-log1.log"
- In UNIX:
ajslogprint -b 2010/10/01 -e 2011/03/31 -k C304 /var/opt/jp1ajs2/log/schedule/AJSROOT1/ajs-log1.log