Hitachi

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


15.1.1 Settings for starting multiple scheduler services

Job groups are managed by the scheduler service. If multiple scheduler services are started, the scheduler services can be used to manage the job groups.

To start multiple scheduler services, you must first set information such as the names of the scheduler services to be added.

The following describes the procedures for adding and deleting scheduler services.

For details about how to add scheduler services to a logical host and how to delete scheduler services from a logical host, see 17.2.10 Setting startup of multiple scheduler services on a logical host.

Organization of this subsection

(1) Adding a scheduler service

To add a scheduler service:

  1. Stop the JP1/AJS3 service.

    Execute the following commands to confirm that all processes have stopped:

    # /etc/opt/jp1ajs2/jajs_stop
    # /opt/jp1ajs2/bin/jajs_spmd_status
    Important

    All embedded databases configured on the physical host must be operating. Execute the ajsembdbstatus command with -s ust -id _JFn (n: 0 to 9 or A to Z) specified to confirm that the embedded database is operating (UNIT-STAT is ONLINE). If the database is not operating, use the ajsembdbstart command with -id _JFn specified to activate it.

    Execute the ajsembdbidlist command to check the setup identifier (_JFn) of the embedded database to be activated.

  2. Use the mkdir command or another means to create the following directories:

    • Database directory

    • Directory for temporary files

    • Job information directory

    • Backup information directory

    Make sure that the above directories, other than the backup information directory, are neither directories used by other scheduler services set on the local hosts (the physical host and all logical hosts) nor subdirectories of those directories.

  3. Execute the jajs_setup command to add the scheduler service.

    jajs_setup -a -F scheduler-service
     -p service-for-the-port-reporting-the-job-status
     -d database-directory
     -t directory-for-temporary-files
     -j job-information-directory
     -b backup-information-directory
     -n scheduler-service-identification-number
     [[-I setup-identifier
       -P embedded-database-port-number]
      [-M {s|m|l}]
      [-B]
     |-S]

    Example of adding a scheduler service named AJSROOT2:

    jajs_setup -a -F AJSROOT2
     -p jp1ajs2report2
     -d "/var/opt/jp1ajs2/database/schedule/AJSROOT2"
     -t "/var/opt/jp1ajs2/tmp/schedule2"
     -j "/var/opt/jp1ajs2/jobinf2"
     -b "/var/opt/jp1ajs2/backup/schedule2"
     -n 2

    For details about the jajs_setup command, see jajs_setup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

  4. Perform advanced setup for the embedded database.

    If you specified the -S option in step 3, perform advanced setup for the embedded database. For details about advanced setup for the embedded database, see 23.4 Advanced setup of an embedded database.

  5. For the service name of the port that reports the job status specified in step 3, set the port number.

    Open the /etc/services file with a text editor, and add the port number. When you add a scheduler service to a physical host, make sure that the scheduler service does not use a port number that is used by another scheduler service that runs on the physical host.

    Example of setting 20248 as the port number:

       jp1ajs2report2   20248/tcp
  6. If you want to use queueless jobs, you must perform the setup required for using queueless jobs.

    Execute the following command:

    ajsqlsetup [-F scheduler-service-name]

    For details about the ajsqlsetup command, see ajsqlsetup in 4. Commands Used for Special Operation in the manual JP1/Automatic Job Management System 3 Command Reference.

  7. Restart the JP1/AJS3 service.

    The scheduler service is added and started with the specified settings.

    After the JP1/AJS3 service has been restarted, use JP1/AJS3 - View to confirm that the manager job group is displayed with the name of the added scheduler service attached.

Supplementary note on command execution:

When the scheduler service is adding, if you execute a command without specifying a scheduler service name in the -F option, the default scheduler service is assumed.

You can omit the -F option when the name of a scheduler service name is specified in the AJSCONF environment variable.

(2) Deleting a scheduler service that has been added

To delete a scheduler service that has been added:

  1. Execute the jajs_spmd_stop command to stop the JP1/AJS3 services.

    Stop all JP1/AJS3 services, including the JP1/AJS3 - Manager services, on logical hosts.

    Important

    All embedded databases configured on the physical host must be operating. Execute the ajsembdbstatus command with -s ust -id _JFn (n: 0 to 9 or A to Z) specified to confirm that the embedded database is operating (UNIT-STAT is ONLINE). If the database is not operating, use the ajsembdbstart command with -id _JFn specified to activate it.

    Execute the ajsembdbidlist command to check the setup identifier (_JFn) of the embedded database to be activated.

  2. Execute the ajsshmdel command to delete scheduler service information.

    The ajsshmdel command is located in /opt/jp1ajs2/bin/ajsshmdel.

    If the shell is sh, the command line is as follows:

    /opt/jp1ajs2/bin/ajsshmdel >/dev/null 2>&1

    If the shell is csh, the command line is as follows:

    /opt/jp1ajs2/bin/ajsshmdel >&/dev/null
  3. Execute the following jajs_setup command to delete the scheduler service.

    jajs_setup -e -F scheduler-service-name

    Example of deleting the AJSROOT2 scheduler service:

    jajs_setup -e -F AJSROOT2

    For details about the jajs_setup command, see jajs_setup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

  4. Delete the directory that was created when the scheduler service was added.

    Delete the following directories that were created when you executed the jajs_setup command:

    • Database directory specified in the -d option

    • Directory for temporary files specified in the -t option

    • Job information directory specified in the -j option

    • Backup information directory specified in the -b option

  5. If a trace log has been output per scheduler service, delete the trace log file for the deleted scheduler service.

    If yes is set in the TRACELOGDIV environment setting parameter, a trace log is output for individual scheduler services. In that case, trace log files are output with the name tracelog_scheduler-service-name to the folder specified in the TRACELOGDIVDIR environment setting parameter. Therefore, delete the trace log file for the deleted scheduler service.

  6. Start the JP1/AJS3 services.

    The scheduler service you added is deleted.

(3) Uninstalling an unnecessary database environment

For details about how to uninstall a database environment that is no longer necessary, see 6.1.1(3) Uninstalling an unnecessary database environment.

(4) Renaming a scheduler service

Renaming a scheduler service affects many types of JP1/AJS3 functions. For example, a unit might end abnormally or might not be executed properly. To prevent such problems, we recommend that you rename a scheduler service before operation starts.

The following describes how to rename a scheduler service before and after operation starts.

(a) How to rename a scheduler service before operation starts

To rename a scheduler service before operation starts:

  1. Execute the jajs_setup command to rename the scheduler service.

    Execute the following command:

    jajs_setup -r -F scheduler-service-name-before-the-change -A new-scheduler-service-name

    For details about the jajs_setup command, see jajs_setup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

(b) How to rename a scheduler service after operation starts

To rename a scheduler service after operation starts:

  1. Stop the scheduler service to be renamed, and then cold-start the scheduler service.

    After the cold-start, do not register a jobnet for execution until the renaming procedure is finished.

  2. Stop the JP1/AJS3 services on the physical host and all logical hosts.

  3. Execute the ajsshmdel command to delete the shared memory information.

    The path to the ajsshmdel command is /opt/jp1ajs2/bin/ajsshmdel.

    Example:

    For sh: /opt/jp1ajs2/bin/ajsshmdel >/dev/null 2>&1

    For csh: opt/jp1ajs2/bin/ajsshmdel >&/dev/null

  4. Execute the jajs_setup command to rename the scheduler service.

    Example: To change AJSROOT2 to AJSROOT5:

    jajs_setup -r -F AJSROOT2 -A AJSROOT5

    If the KAVS1133-W message is not output during execution of the jajs_setup command, skip step 5 and step 6 and go to step 7.

    If the KAVS1133-W message is output during execution of the jajs_setup command, check the setting name indicated in the message. If Local date and time is indicated, go to step 5. If Suspend feature is indicated, go to step 6, and then proceed to step 7.

    Cautionary note:

    Before you rename a scheduler service for which the local date and time is set, obtain the difference between the local date and time for the scheduler service and the system date and time. Use the ajslocaldate command to obtain the scheduler service local date and time.

    For details about how to obtain the system date and time, see the documentation for your OS.

    If an attempt to set the scheduler service local date and time fails and the KAVS1133-W message appears, use the time difference obtained above to set the scheduler service local date and time in step 5.

  5. Set the scheduler service local date and time again.

    Execute the ajslocaldate command to set the scheduler service local date and time for the renamed scheduler service.

    Example: To set the local date and time for the scheduler service AJSROOT5 forward five minutes (300 seconds) from the current time, execute the command as follows:

    ajslocaldate -F AJSROOT5 -s 300

    For details about the ajslocaldate command, see ajslocaldate in 4. Commands Used for Special Operation in the manual JP1/Automatic Job Management System 3 Command Reference.

  6. Set the suspend function again.

    Execute the ajssetup command to enable the suspend function for the renamed scheduler service.

    Example: To enable the suspend function for the scheduler service AJSROOT5, execute the command as follows:

    ajssetup -F AJSROOT5 -m

    For details about the ajssetup command, see ajssetup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

  7. If the scheduler service name before the change is set for the following environment setting parameters, use the jajs_config command to change them to the new scheduler service name.

    Table 15‒1: Environment setting parameters whose settings need to be changed

    Definition key

    Environment setting parameter

    Explanation

    [JP1_DEFAULT\JP1AJSMANAGER]

    "DEFAULTSERVICENAME"=

    Default scheduler service name

    "REMNETSERVICENAME"=

    Name of the scheduler service that executes a remote jobnet

    Example: To change the default scheduler service name to AJSROOT5, execute the command as follows:

    jajs_config -k "[JP1_DEFAULT\JP1AJSMANAGER]" "DEFAULTSERVICENAME"="AJSROOT5"

    Example: To change the name of the scheduler service that executes remote jobnets to AJSROOT5, execute the command as follows:

    jajs_config -k "[JP1_DEFAULT\JP1AJSMANAGER]" "REMNETSERVICENAME"="AJSROOT5"

  8. If a trace log has been output per scheduler service, change the name of the trace log file used for each scheduler service before changing the scheduler service name.

    If yes is set in the TRACELOGDIV environment setting parameter, a trace log is output for individual scheduler services. In that case, trace log files are output with the name tracelog_scheduler-service-name to the folder specified in the TRACELOGDIVDIR environment setting parameter. Therefore, change the scheduler-service-name part from the scheduler service name before the change to the new scheduler service name.

  9. Start the JP1/AJS3 services.

  10. In either of the following cases, after the scheduler services start, change or set the scheduler service settings if necessary:

    • The scheduler service name before the change is specified in the unit definition.

    • The JP1/AJS3 linkage facility was monitoring or collecting information from the scheduler service before it was renamed.

(c) Notes on renaming scheduler services

The following environment setting parameters for scheduler services use the directory path that contains the scheduler service name as a standard:

  • AJSSYSDIR

  • AJSLOGDIR

  • AJSDBDIRECTORY

  • AJSLOGFILE1

  • AJSLOGFILE2

Operation is not affected even if the environment setting parameters are not changed after the scheduler service is renamed. However, if necessary, consider changing the directory path that contains the new scheduler service name.

When you change the setting of the AJSDBDIRECTORY environment setting parameter in an environment using the suspend function or queueless jobs, you must set up the suspend or queueless job function again after changing the parameter setting.

Use the jajs_config command to change the environment setting parameters. For details about the jajs_config command, see jajs_config in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

For details about the parameters, see 20.4 Setting up the scheduler service environment.