Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Administration Guide


7.7 Swapping a scheduler log file

The scheduler logs for the scheduler services are output either to a separate file for each service or to a single file for the host. You can use the AJSLOGOUTPUTDEST environment setting parameter to specify output separately for each scheduler service or for the host.

For both types of output, output is to one of two log files. When the amount of data stored in the current log file reaches the file size specified in the environment settings, the log file is replaced by the other file.

For output for each scheduler service.

The file specified in the AJSLOGFILE1 environment setting parameter is replaced by the file specified in the AJSLOGFILE2 environment setting parameter.

For output for the host.

The file specified in the HOSTLOGFILE1 environment setting parameter is replaced by the file specified in the HOSTLOGFILE2 environment setting parameter.

You can use the -c option of the ajsalter command to forcibly switch the file to which the scheduler log is output. You can also select either of two methods for switching a scheduler log file:

If log output is blocked due to a log output error that occurred during scheduler log output, you can cancel the blocked status by executing the ajsalter command -c option to switch the scheduler log file. For details about the ajsalter command, see ajsalter in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

In addition, when you use the ajsalter command -o option, the scheduler log file is switched as follows based on the specification of the AJSLOGOUTPUTDEST environment setting parameter.

Table 7‒7: Scheduler log file subject to the -c option according to the combination of the environment setting parameter AJSLOGOUTPUTDEST and -o option

Specification of AJSLOGOUTPUTDEST

-o option of the ajsalter command

Specified

Not specified

schedule (default value)

For the host

For each scheduler service

host

For the host

For the host

Legend:

For the host: The scheduler log file for the entire host

For each scheduler service: The scheduler log file for each scheduler service

For details about the AJSLOGOUTPUTDEST environment setting parameter, see 20.4.2(28) AJSLOGOUTPUTDEST in the JP1/Automatic Job Management System 3 Configuration Guide.

Examples of using the AJSLOGOUTPUTDEST environment setting parameter and the ajsalter command:

The following are examples of using the ajsalter command in the following environment.

Environment (manager host: HOST)
Scheduler log files for the host:

/var/opt/jp1ajs2/log/ajs-host-log1.log

/var/opt/jp1ajs2/log/ajs-host-log2.log

Scheduler service AJSROOT1
  • Value of the AJSLOGOUTPUTDEST environment setting parameter: schedule

  • Scheduler log files:

    /var/opt/jp1ajs2/log/schedule/AJSROOT1/ajs-log1.log

    /var/opt/jp1ajs2/log/schedule/AJSROOT1/ajs-log2.log

Scheduler service AJSROOT2
  • Value of the AJSLOGOUTPUTDEST environment setting parameter: host

  • Scheduler log files

    /var/opt/jp1ajs2/log/ajs-host-log1.log

    /var/opt/jp1ajs2/log/ajs-host-log2.log

Example 1

This example shows how to switch the scheduler log file for scheduler service AJSROOT1:

ajsalter -F AJSROOT1 -c CHANGE

In this case, the scheduler log file /var/opt/jp1ajs2/log/schedule/AJSROOT1/ajs-log1.log for the scheduler service is switched to /var/opt/jp1ajs2/log/schedule/AJSROOT1/ajs-log2.log.

Example 2

This example shows how to switch the scheduler log file for the manager host HOST on which the scheduler service AJSROOT1 is defined:

ajsalter -F AJSROOT1 -o -c CHANGE

In this case, the scheduler log file /var/opt/jp1ajs2/log/ajs-host-log1.log for the host is switched to /var/opt/jp1ajs2/log/ajs-host-log2.log.

If you specify the -o option to switch the scheduler log file for the host, note that the scheduler log file for scheduler service AJSROOT2 is also switched. This is because the AJSLOGOUTPUTDEST environment setting parameter for AJSROOT2 is also set to host on the same manager host.

Example 3

This example shows how to switch the scheduler log file for the manager host HOST on which the scheduler service AJSROOT2 is defined:

ajsalter -F AJSROOT2 [-o] -c CHANGE

In this case, the scheduler log file /var/opt/jp1ajs2/log/ajs-host-log1.log for the host is switched to /var/opt/jp1ajs2/log/ajs-host-log2.log.

Because the AJSLOGOUTPUTDEST environment setting parameter for scheduler service AJSROOT2 is set to host, the scheduler log file for the host is switched regardless of whether the -o option is specified.