Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Command Reference


ajslogprint

Organization of this page

Format

ajslogprint
      [-b extract-start-day]
      [-e extract-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 extract-start-day

Specify the start day of the range (term) for which you want to extract 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, log records are extracted from the beginning of the log.

-e extract-end-day

Specify the end day of the range (term) for which you want to extract 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, log records to the end of the log are extracted.

-k log-type

Specify the type of log you want to extract.

For the log types that can be specified, see C.1 Log entries output by the scheduler services in the manual JP1/Automatic Job Management System 3 Troubleshooting.

If this option is omitted, all types of log records are subject to extraction.

-F service-name

Specify the name of the scheduler service for which you want to extract.

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 extraction.

-u unit-name

Specify the full path name of the unit for which you want to extract.

You can specify a character string of 1 to 930 bytes.

If this option is specified, log records that do not contain the specified unit name are not subject to extraction. Also note that only the log records for the specified unit are subject to extraction. The log records for subordinate units of the unit are not subject to extraction.

If this option is omitted, log records for all units are subject to extraction.

-m message-ID

Specify the message you want to extract.

You can specify a character string of 1 or 10 bytes.

To extract only the log records that report normal termination of operation for log types of a scheduler service or unit (log types beginning with C), specify 0.

To extract 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 extraction.

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

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 extract-start-day

--

2

-e extract-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 JP1/Automatic Job Management System 3 Operator's Guide.

Return values

0

Normal end.

4

Any of the following results:

  • Arguments are specified incorrectly.

  • Log records that match the conditions do not exist.

  • The format of the scheduler log file is incorrect.

  • The scheduler log file name is not specified.

  • The scheduler log file name is too long.

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