Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 System Design (Configuration) Guide


2.5.1 Defining execution agents

Consider the following points when defining the agent host information to be registered in the manager hosts.

Organization of this subsection

(1) Assigning execution agent names and execution host names

The agent host information to be registered in a manager host consists of the logical names of the agent hosts (execution agent names) and the physical name of the execution host. Assign each execution host an execution agent. A maximum of 1,024 execution agents can be registered in one manager host. You can increase the maximum number of agent hosts to 2,048.

When defining a job or jobnet, specify the execution agent name as the host on which the job is to be executed. The manager host references the registered execution agent information, and sends the job to the execution host corresponding to the execution agent name defined in the job or jobnet. Thus, when the agent host configuration needs to be changed due to an increase or decrease in work volume, rather than having to change the job or jobnet definition, you can simply change the execution agent information registered on the manager host without disrupting JP1/AJS3 operations.

(2) Maximum number of concurrently executable jobs

The number of concurrently executable jobs on an agent host can be restricted according to the resources available for that host. The setting applies to Unix jobs (other than queueless jobs), PC jobs (other than queueless jobs), flexible jobs, HTTP connection jobs, action jobs, custom jobs, and Passing information settings jobs.

The maximum number of concurrently executable jobs can be specified for particular time periods (set in 30-minute units). The default setting is 00:00-00:00=5 (maximum of five concurrent jobs, 24 hours a day).

For example, if you specify 08:00-17:30=5, a maximum of five jobs can be executed concurrently during the time period 8:00 to 17:30. By adjusting the maximum number of concurrent jobs in this way, you can distribute the processing load at certain times of the day.

When the number of jobs to be executed reaches the maximum number of concurrently executable jobs, additional jobs are queued on the manager host.

Cautionary notes
  • If you do not specify the maximum number of concurrently executable jobs when adding an execution agent, the default (maximum of five concurrent jobs, 24 hours a day) is used. This setting does not affect operation if you execute jobs with short execution times or register only a few jobs for execution at the same time. However, if you execute jobs with long execution times or register many jobs at the same time, the number of concurrent jobs will quickly reach the maximum, and remain there for a extended periods of time. This might affect the execution of subsequent jobs.

    When the maximum number of concurrently executable jobs is reached on an agent host, subsequent jobs are made to wait in the queuing status until the active jobs finish. In such cases, the time the jobs end is later than the scheduled time. Taking the job execution time and the number of jobs executed per unit of time into consideration, in addition to considering resources on the agent host, consider setting a large value for the maximum number of concurrently executable jobs.

  • The maximum number of concurrently executable jobs you specify applies to each execution agent. If an execution host is connected by using different execution agent names, jobs equal to the total of the maximum number of concurrently executable jobs specified for these execution agents will be executed concurrently on that execution host.

    For example, suppose that the same execution host is specified for an execution agent with 00:00-00:00=10 (maximum of 10 concurrent jobs, 24 hours a day) set, and an execution agent with 00:00-00:00=5 (maximum of five concurrent jobs, 24 hours a day) set. In this case, a maximum of 15 jobs can be executed concurrently.

    When you specify a maximum number of concurrently executable jobs, specify a value appropriate for the execution host.

(3) Default execution agent

By default, the local host is set as an agent host in the information registered in the manager host. This agent is referred to as the default execution agent.

The agent host information defined as the default execution agent is as follows:

Table 2‒40: Information defined as the default execution agent

No.

Item

Setting

1

Execution agent name

@SYSTEM

2

Execution host name

Manager host name

3

Maximum number of concurrently executable jobs

5 (00:00-00:00=5)

4

Restricting job transfer

Jobs can be accepted and transferred to the execution host.

This default execution agent can be used to execute jobs on a manager host. It is also used when no execution agent is specified in the job or jobnet definition.

To change the default execution agent definition, use the ajsagtalt command or JP1/AJS3 - Web Console. For details about the command, see ajsagtalt in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

Cautionary note

In JP1/AJS2, when the manager host name was specified, jobs were automatically executed on the default manager host. In JP1/AJS3, if you want to specify the local host name to execute jobs, you need to add an execution agent, other than the default execution agent, that has the same name as the local host name. Note, however, that if you migrate the unit definition to another manager host when the local host name is specified, you need to change the Exec-agent setting to the destination host name. For this reason, we recommend that you use the default execution agent to execute jobs on the local host.

(4) Adding a execution agent

Execution agents must be added for the number of agent hosts on which you want to execute jobs because only the default execution agent is created on the manager host immediately after setup.

Use the ajsagtadd command or JP1/AJS3 - Web Console to add an execution agent. You can also add multiple execution agents in one operation. For details about the procedure, see 4.1 Execution agent settings in the JP1/Automatic Job Management System 3 Configuration Guide. To add multiple execution agents collectively, see the description of the -f option in ajsagtadd in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

(5) Defining an agent automatically

When the setting for automatically defining an agent is enabled, the execution agent (assigned execution agent name and execution host name) that has the same name as the execution agent name specified in the job's Define Details dialog box is automatically added to the manager host.

For details about the agent automatic definition function, see 20.5 Setting up the job execution environment in the JP1/Automatic Job Management System 3 Configuration Guide.

Cautionary notes
  • We recommend that the system administrator set the agent automatic definition function when setting up JP1/AJS3. When this function is enabled to execute jobs, make sure that only users who have both JP1_JPQ_User and JP1_JPQ_Admin permissions can execute jobs.

  • When you use the agent automatic definition function and the execution agent restriction function, an execution agent that is automatically defined during job execution needs to be set in the execution agent profile before execution of the job. If the execution agent has not been set, the job is placed in the Failed to start status, in which case the execution agent will not be added.

(6) Execution agent restriction

You can use the execution agent restriction functionality to set an execution agent that is permitted to execute jobs for each unit.

By setting permitted execution agents in an operation profile called the execution agent profile, you can prevent jobs from being executed on the wrong execution agents.

For details about setting an execution agent profile, see 21.1.1 Setting execution agent restrictions in the JP1/Automatic Job Management System 3 Configuration Guide.

(a) Overview of execution agent restriction

When the execution agent profile is enabled, whether the execution agent specified in the job's Define Details dialog box has been set in the execution agent profile is checked when:

  • A unit is defined in JP1/AJS3 - View

  • A definition pre-check is performed by using the ajschkdef command

  • A job is executed

If the specified execution agent is not set in the execution agent profile, a definition error occurs or the job is placed in the Failed to start status if execution is attempted.

The following figure shows an example of using the execution agent restriction functionality.

Figure 2‒48: Example of using the execution agent restriction functionality

[Figure]

In this example, execution agent AGT1, which is permitted to execute jobs in jobnet net1, and execution agent AGT2, which is permitted to execute jobs in jobnet net2, are set in the execution agent profile. Jobs /net1/job1 and /net2/job1 are executed because permitted execution agents are specified. In the case of job /net1/job2, execution is suppressed because execution agent AGT2, which is not permitted to execute the job, is specified. In the case of job /net2/job2, because no execution agent is specified, an attempt is made to execute the job on the manager host (default execution agent), but the attempt is suppressed. If you want to execute jobs on the manager host without specifying the execution agent during definition of the unit, you need to set the default execution agent name in the execution agent profile.

Note that the execution agent is not checked for units that are not set in the execution agent profile.

■ Applicable units

You can check whether the execution agent specified in the Define Details dialog box for the unit is set in the execution agent profile for the following units:

  • Root jobnet#1

  • Nested jobnet#1

  • Unix job

  • PC job

  • Flexible job#2

  • HTTP connection job

  • Event job

  • Action job

  • Custom job

#1

Checking is performed only if the execution agent was specified before the unit was defined in JP1/AJS3 - View.

#2

A flexible job uses a relay agent not an execution agent. If you do not use a relay function of a flexible job, permit @SYSTEM or define and permit an execution agent for the relay agent for a flexible job.

■ How to check the execution agent

If execution agent restriction is used, the execution agent is checked when a unit is defined in JP1/AJS3 - View, when a definition pre-check is performed by using the ajschkdef command, and when a job is executed.

The following describes how the check is performed for each case.

When a unit is defined in JP1/AJS3 - View

In the Define Details dialog box for the unit, the Exec-agent combo box displays the execution agents set in the execution agent profile. You can either select a displayed execution agent or type an agent name in the combo box. Click the OK button to check whether the specified execution agent is set in the execution agent profile.

You can also specify that checking is to be performed only when a unit is defined, and suppress checking when a job is executed.

Note, however, that in the Define Details - [Flexible Job] dialog box, the combo box that displays the execution agents set in the execution agent profile is not displayed in the Relay agent. In addition, when you click the OK button, you are not asked whether the specified execution agent is set in the execution agent profile.

When a definition pre-check is performed by using the ajschkdef command

When a definition pre-check is performed, the execution agent profile is checked to see whether the execution agent has been set. If an execution agent that has not been set, the check result information is output to the check result file.

Note that the ajschkdef command with the -C and -p options specified allows you to check the execution agent irrespective of whether the execution agent profile is enabled or disabled.

When a job is executed

When a job is executed, the execution agent profile is checked to see whether the execution agent is set. If an attempt is made to execute the job on an execution agent that has not been set, the job is placed in the Failed to start status. Note, however, that when one of the event jobs defined in the start conditions causes an error during the execution agent check, jobs are placed in one of the following statuses:

  • Monitoring generation of the jobnet with start conditions:

    Monitor terminated status

  • The job causing the error during the execution agent check:

    Failed to start status

  • Jobs defined in the start conditions other than the job described above:

    Not executed + Ended status

You can also specify that checking is performed only when a job is executed, and that checking is suppressed when a unit is defined.

(b) Permitted execution agents

When you specify units on multiple levels in the execution agent profile, the execution agent specified for a lower-level unit must be permitted for all upper-level units.

The following figure shows the relationship between the execution agent profile settings and the permitted execution agents.

Figure 2‒49: Execution agent profile settings and permitted execution agents

[Figure]

In this example, Job A can be executed only on execution agent AG1, which is permitted for the scheduler service, Root Jobnet A, and Nested Jobnet A. Job D can neither be defined nor executed because an execution agent is not permitted for any of the upper-level units of Job D. Execution agent profiles with such settings will be handled as a syntax error when an attempt is made to enable the execution agent restriction.

To prevent the execution agent check process from affecting tasks when a permitted execution agent is specified for units in multiple levels, we recommend that the execution agent be specified for no more than the following levels:

  • Scheduler service

  • Units directly under the scheduler service

■ When permitting execution on the local host

@SYSTEM must be specified. Note, however, that if you want to permit an execution agent that has the same name as the local host name, specify the execution agent name.

If you want to permit execution of queueless jobs on the local host, specify the local host name. Hereafter, local host name refers to names that can be checked by using the following methods.

  • Physical host:

    The host name determined by executing the hostname command

  • Logical host (Windows):

    On the host where JP1/AJS3 is running, in Control Panel, either choose Services, or choose Administrative Tools and then Services. In the Services dialog box that opens, the host name is displayed as xxxxx in JP1/AJS3_xxxxx.

  • Logical host (UNIX):

    Execute the ps command. The host name is displayed after the jajs_spmd process.

■ When specifying an execution agent group as the unit execution agent

To specify an execution agent group as the execution agent for units, set the name of the execution agent group name that will be permitted to execute jobs in the execution agent profile.

The following figure shows an example of setting an execution agent group in the execution agent profile.

Figure 2‒50: Setting an execution agent group in the execution agent profile

[Figure]

In this example, when either AGTGRP1 or AGT1 is specified as the execution agent for the jobs in /Grp1/net1/, the jobs will actually be executed on execution agent AGT1 (execution host host1). However, because AGT1 is not specified in the execution agent profile, specifying AGT1 as the execution agent for the jobs result in an error during the execution agent check.

■ When specifying a macro variable name for the unit execution agent

To specify a macro variable name for the unit execution agent, set the name of an execution agent or a macro variable name permitted to execute in the execution agent profile, depending on the point at which execution agent restriction is to be checked.

The following table describes the information that needs to be set in the execution agent profile when a macro variable name is specified.

Table 2‒41: Execution agent profile settings when a macro variable name is specified

No.

Restriction checked when a unit is defined (View)

Restriction checked when a job is executed (JobExec)

Definition or execution is permitted for:

1

No (off)

Yes (on)

Execution agent name

2

Yes (on)

No (off)

Macro variable name

3

Yes (on)

Yes (on)

  • Macro variable name

  • Execution agent name

We recommend you use a combination of Nos. 1 and 2 to set the execution agent profile.

■ For queueless jobs

To use the execution agent restriction functionality for a queueless job, set the name of the host on which the queueless job will be executed in the execution agent profile.

If the target host with a class name is specified in Exec-agent in the Define Details dialog box, you do not need to set the !class-name portion in the execution agent profile.

If a logical host that has not been attached is specified as the execution host for the queueless job, the queueless job is executed on the physical host corresponding to the logical host when the following conditions exist:

  • The logical host specified for the queueless job has been set in the execution agent profile.

  • exec is set in the AJSQL_NOATTACHREQ environment setting parameter.

Whether the physical host is set in the execution agent profile does not matter. Even if the physical host is not defined in the execution agent profile, the queueless job can be executed on the physical host.

(c) Cautionary notes

  • The execution agent restriction functionality can be used when the version of JP1/AJS3 - Manager and JP1/AJS3 - View is 09-50 or later.

  • The system does not check the execution agent when a unit is created by using one of the methods below. If you want to check the execution agent, you will need to perform a pre-check.

    • Copying and pasting a unit, or cutting and pasting a unit

    • Restoring a backed-up unit

    • Distributing a unit by using JP1/Software Distribution or JP1/FTP

  • Before executing a job, make sure that the execution agent or the execution agent group that has been set in the execution agent profile is defined in JP1/AJS3 - Manager. If they are not defined in JP1/AJS3 - Manager, no error occurs when the unit is defined, but an error occurs when pre-check is performed or when a job is executed.

  • When you use the agent automatic definition function and the execution agent restriction function, an execution agent that is automatically defined during job execution needs to be set in the execution agent profile before execution of the job. If the execution agent has not been set in the execution agent profile, the job is placed in the Failed to start status, in which case the execution agent will not be added.

  • An execution agent specified for a remote jobnet and subordinate units must be in JP1/AJS3 - Manager to which the remote jobnet is to be transferred. Therefore, the execution agent is not checked when a unit is defined or when a pre-check is performed. When a job is executed, if the execution agent profile is enabled in the JP1/AJS3 - Manager to which the remote jobnet is to be transferred, the execution agent is checked according to the profile settings.

(7) Increasing the maximum number of execution agents that can be registered in a manager host

By default, the maximum number of execution agents that can be registered in a manager host is set to 1,024. By using the environment setting parameter AGENTLIMITEXTEND, you can increase the maximum number to 2,048.

For details, with Windows hosts, see 6.2.28 Setting to increase the maximum number of execution agents that can be registered in a manager host in the JP1/Automatic Job Management System 3 Configuration Guide. For details with UNIX hosts, see 15.2.25 Setting to increase the maximum number of execution agents that can be registered in a manager host in the JP1/Automatic Job Management System 3 Configuration Guide.