Hitachi

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


ajschkdef

Organization of this page

Format

ajschkdef
     [-F service-name]
     [{-s|-a}]
     [-O][-M][-C][-P][-H][-D][-U][-A]
     [-p execution-agent-profile-name]
     [-e unit-attribute-profile-name]
     [-u registered-user-name]
     [-o output-file-name]
     [-R]
     [-L]
     [-T]
     [-N]
     [-J]
     job-name, jobnet-name-or-job-group-name...

Description

Starts the execution of a definition pre-check and displays the state of execution.

Execution privileges

In Windows: Administrators privileges

In UNIX: Superuser privileges

Storage directory

In Windows:

JP1/AJS3 - Manager-installation-folder\bin\

In UNIX:

/opt/jp1ajs2/bin/

Arguments

-F service-name

Specify the name of a scheduler service for which units that will undergo a definition pre-check are defined.

You can specify a string of 1 to 30 bytes.

If you omit this option, the default is the value of environment variable AJSCONF. If environment variable AJSCONF has not been set, the name of the default scheduler service is assumed.

When specifying the scheduler service name for the logical host, you need to specify the logical host name in environment variable JP1_HOSTNAME.

If environment variable JP1_HOSTNAME has not been set, the local host name is assumed.

-s

Starts the execution of the definition pre-check.

-a

Outputs the execution status of the definition pre-check to the standard output file. The following table summarizes the names of execution statuses to be output:

State of execution

Name of status to be output

Meaning

Not yet executed

stop

  • The definition pre-check can be executed.

  • The definition pre-check result file has been updated.

Currently being executed

run

  • The definition pre-check cannot be executed.

  • The definition pre-check result file is being updated

-O, -M, -C, -P, -H, -D, -U, -A

Specify the items you want to check in a definition pre-check.

You can specify more than one check item at the same time. The following table summarizes what each option actually checks and the order in which checks are made (the order shown is an example).

Checking order

Option

Check item

1

-O

Order of execution

2

-M

Detailed jobnet definition#1

3

-C

Execution agent restriction

4

-P

Empty job definition

5

-H

Execution agent name

6

-U

User mapping#2

7

-D

Detailed job definition

8

-A

Execution file privileges#2

#1

This option also checks the jobnet connectors and the units whose ends are being waited for by wait conditions.

#2

If you use the execution-user fixing function, this item is checked for the fixed JP1 user as defined in the unit-attribute profile.

The command checks in the order of the options shown in the table, regardless of the order in which you specify the options. If the -D option (detailed job definition) or -A option (execution file privileges) is specified, the user mapping will also be checked as a precondition because information about the OS user that executes the job is required. If the -P, -H, -U, -D, or -A options (corresponding to 4 to 8 in the Checking order column) are specified to be checked by the agents, the execution agent name will also be checked as a precondition.

By default, all options (-O, -M, -C, -P, -H, -U, -D, -A) are assumed.

None of these options can be specified together with the -a option.

-p execution-agent-profile-name

When checking execution agent restriction, specify the applicable execution agent profile using an absolute path.

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

If the folder you specify contains spaces, enclose the entire path in double quotation marks (").

You can specify this option together with the -C option. If you specify the -C option but omit this option, the execution agent profile for the scheduler service specified in the -F option applies.

-e unit-attribute-profile-name

When checking the execution-user fixing function, specify the applicable unit-attribute profile using an absolute path.

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

If the folder you specify contains spaces, enclose the entire path in double quotation marks (").

You can specify this option together with the -U, -D, or -A option. If you specify the -U option but omit this option, the system assumes the unit attribute profile for the scheduler service specified in the -F option. If you omit the -F option, the system assumes the unit attribute profile for the default scheduler service.

-u registered-user-name

Specify the JP1 user for which the jobnet is actually registered in actual operation.

You can specify a string of 1 to 31 bytes.

When the job definition has a registered user in its execution-user type, the specified JP1 user performs the user mapping check.

By default, the user executing this command is assumed.

This option cannot be specified together with the -a option.

-o output-file-name

Using an absolute path, specify the pre-check result file name. See Output example for the format of the pre-check result file name.

You can specify a string of 1 to 255 bytes.

An overwrite is performed if there is a file whose name is the same as that of the specified output file.

An error occurs if there is no directory path.

If you omit this option, the default is the file name specified in the environment variable parameter AJSCHK_CHECKFILE. If the AJSCHK_CHECKFILE environment setting parameter is not specified, the default value for the AJSCHK_CHECKFILE is assumed.

For details on the AJSCHK_CHECKFILE environment setting parameter, see 20.7.2(1) AJSCHK_CHECKFILE in the JP1/Automatic Job Management System 3 Configuration Guide.

This option cannot be specified together with the -a option.

-R

Treats all jobnets or jobs under the specified unit as subject to the definition pre-check (pre-check starting point). If this option is specified together with the -L, -T, -N, or -J option, the applicable jobnets and jobs are subject to the definition pre-check (check starting point) according to the specification of each option.

To check all jobnets and jobs under a job group, specify this option together with the -T option.

This option cannot be specified together with the -a option.

-L

Performs a definition pre-check on unregistered jobnets and jobs.

If you specify this option together with the -T, -N, or -J option, a definition pre-check is performed on unregistered jobnets according to the definition of each option.

This option cannot be specified together with the -a option.

-T

Performs a definition pre-check on the root jobnet.

You cannot specify this option together with the -a or -J option.

-N

Performs a definition pre-check on jobnets.

You cannot specify this option together with the -a or -J option.

-J

Performs a definition pre-check on jobs.

You cannot specify this option together with the -a, -T, or -N option.

job-name, jobnet-name-or-job-group-name

Specify the job, jobnet, or job group for which you are to perform a definition pre-check.

A definition pre-check starts with the units immediately under the specified unit.

You can specify a string of 1 to 930 bytes.

You can specify multiple jobs, jobnets, or job groups. You can also specify the root job group (/). Note that you must specify the -R option if you specify a job group name.

Note that a job, jobnet, or job group cannot contain the logical host name, scheduler service name, or execution ID.

This option cannot be specified together with the -a option.

Notes

Return values

0

Normal end

Values other than 0

Abnormal end

Example

In this example, the command below executes a definition pre-check under the following conditions:

ajschkdef -F AJSROOT1 -s -u USER1 -RLJ /GROUP1/NET1

Output example

The following shows an example of the command output resulting from a definition pre-check performed under the above conditions. In this example, missing execution agent information is detected on the Manager in /GROUP1/NET1/JOB1, an empty job definition is detected for /GROUP1/NET1/JOB2, and an error related to execution agent permission was detected for /GROUP1/NET1/JOB3.

[Figure]

Explanation of output items

(1) CHECKUNIT=full-unit-name[, full-unit-name...]

The unit name specified when the definition pre-check was performed is output in full-unit-name form. If you specified multiple names, all of them are output, with a comma inserted between them.

(2) CHECKSERVICE=scheduler-service-name

The scheduler service name specified when the definition pre-check was performed is output.

(3) CHECKAGTPROFNAME=execution-agent-profile-name

The execution agent profile name specified when the definition pre-check was performed is output. This field is blank if execution agent profiles are disabled.

(4) CHECKUSER=registered-user-name

The registered-user-name specified when the definition pre-check was performed is output.

(5) CHECKUNITPROFNAME=unit-attribute-profile-name

The unit-attribute profile name specified when the definition pre-check was performed is output. This field is blank if the execution-user fixing function is disabled.

(6) CHECKOPT=specified-option

The options (-O/-M/-C/-P/-H/-D/-U/-A/-R/-L/-T/-N/-J) specified when the definition pre-check was performed are output, with a comma inserted between them.

(7) CHECKSTARTTIME=execution-start-date

The date and time at which the definition pre-check was performed are output in the form YYYY/MM/DD hh:mm:ss.

(8) Empty lines

(9) Check result information (unit name, path name, error category, error details)

After the definition pre-check is performed, information about the check result is output in list form. The units involving errors are listed, with a comma inserted between them.

unit-name

The unit name of a unit that showed an error in the check is output.

path-name

The path name (the full parent unit name) of a unit that showed an error in the check is output.

error-category

The category of an error that was detected in the check is output.

See the following table for the categories of errors that are output.

error-details

The details of an error (classified by error category) that was detected in the check are output.

The following table gives details about output errors.

Check item specified at startup

Error category

Error detail

Order of execution

The execution order is looped in the relation definitions.

  • For 08-10 and earlier:

    (none)

  • For 08-50 and later:

    unit=unit-name#1

A dependent job has not been defined for a judgment job.

  • For 08-10 and earlier:

    (none)

  • For 08-50 and later:

    unit=unit-name;unit-name;...#2

A relation definition other than a conditional connection has been defined for a dependant job.

  • For 08-10 and earlier:

    (none)

  • For 08-50 and later:

    unit=unit-name;unit-name;...#3

Execution agent name

The host name of the Manager cannot be resolved from the Agent side.

MANAGER_HOST=

manager-host-name

The host IP address of the Manager cannot be resolved from the Agent side.#4

MANAGER_IP=

manager-host-IP-address

The execution-agent has not been registered on the Manager side.

EXEC_AGENT=

execution-agent-name

The target host name cannot be resolved from the Manager side.

AGENT_HOST=

execution-host-name

Detailed jobnet definition

The specified connection range is different from the jobnet for the connection-destination.

unit=connection-destination-jobnet-name#5

Cannot connect to the specified host.

nchn=connection-host-name

Specified Scheduler service not exist.

ncsv=connection-service-name

Jobnet name for the connection-destination is not specified.

(none)

The specification of jobnet for the connection-destination is not collect.

ncr=connection-destination-jobnet-name

The jobnet for the connection-destination is not configured for controlling the execution order.

unit=connection-destination-jobnet-name#5

Cannot connect with the connection host name specified in the jobnet for the connection-destination.

unit=connection-destination-jobnet-name#5

The connection service name specified in the jobnet for the connection-destination is incorrect.

unit=connection-destination-jobnet-name#5

The jobnet connector name specified at jobnet for the connection-destination is wrong.

unit=connection-destination-jobnet-name#5

Specified unit whose end is being waited for does not exist.

unit=unit-whose-end-is-being-waited-for

The specification of unit whose end is being waited for is not collect.

unit=unit-whose-end-is-being-waited-for

Detailed job definition

The specified file or directory does not exist.

sc=script-file-name (execution-file-name)

ev=environment-variable-file-name

wkp=working-path-name

si=standard-input-file-name

so=standard-output-file-name

se=standard-error-output-file-name

ts1=transfer-source-file-name

td1=transfer-destination-file-name

ts2=transfer-source-file-name

td2=transfer-destination-file-name

ts3=transfer-source-file-name

td3=transfer-destination-file-name

ts4=transfer-source-file-name

td4=transfer-destination-file-name

You do not have permission to access the specified file or directory.

sc=script-file-name (execution -file-name)

ev=environment-variable-file-name

wkp=working-path-name

si=standard-input-file-name

so= standard-output-file-name

se= standard-error-output-file-name

ts1=transfer-source-file-name

td1=transfer-destination-file-name

ts2=transfer-source-file-name

td2=transfer-destination-file-name

ts3=transfer-source-file-name

td3=transfer-destination-file-name

ts4=transfer-source-file-name

td4=transfer-destination-file-name

The specified platform type is invalid.

pfm=platform-type

The format of the value specified for the event ID is invalid.

evwid=event-ID

The value specified for "Find event before exec." is outside the valid range.

Evesc=pre-search-time

The format of the name of the file to be monitored is invalid.

flwf=monitoring-target-file-name

User mapping#6

The specified user mapping is invalid.

JP1_USER=JP1-user-name

Mapping of an execution host is invalid.

JP1_USER=JP1-user-name

Mapping of a OS user is invalid.

OS_USER=OS-user-name

The specified user does not exist.

un=execution-user-name

Execution file privileges

You do not have permission to execute the specified script file or executable file.

JP1_USER=JP1-user-name

FILE_AUTH=file-privilege#7

Empty job definition

The script file or executable file or event ID is not specified.

(None)

Execution agent restriction

The specified exec-agent is not enabled on the exec-agent profile.

execution-agent-name

#1

Only one unit name is output for units whose execution order is looped in the relation definitions.

#2

The names of judgment jobs for which dependent units are not defined by using conditional relations are output.

If there are multiple errors, all unit names separated with a semicolon (;) are output.

#3

The names of dependent units that have relation definitions other than conditional relations are output.

If there are multiple errors, all unit names separated with a semicolon (;) are output.

#4

This error is output if NAT (network address translation) is used for communication between agents and the manager because the IP address resolved from the manager host name is different for the agent hosts and the manager host. Ignore this error if there are no problems with the settings.

#5

If Other service is specified for Connection range, host-name:scheduler-service-name:unit-name is output.

#6

If the user mapping check fails, the -D option (detailed job definition) check and the -A option (execution file privileges) check are performed assuming that the job execution user is an OS user that has superuser privileges (that is, a root user). Therefore, if the job execution user is not a root user, correct the user mapping error, and then re-execute the detailed job definition check and execution file privileges check.

#7

For details about file privileges, see the following table.

File privileges are output in the same way as in the chmod command. (Example: 0644)

Access permission type

Value

Explanation

Special access permission

1000

Swap is maintained in the program code.

2000

The group ID is set during execution.

4000

The user ID is set during execution.

User with the same UID

100

Execution

200

Writing

400

Reading

Group with the same GID

10

Execution

20

Writing

40

Reading

Other user

1

Execution

2

Writing

4

Reading

(10) Empty lines

(11) CHECKENDTIME=execution-end-date

The date and time when the definition pre-check ended is output in the form YYYYH/MM/DD hh:mm:ss form.

(12) NUMBER OF CHECKUNITS=number-of-checked-units/number-of-units-subject-to-checking, NUMBER OF ERRORS= number-of-items-for-which-an-error-was-detected

Summary information for the result of a definition pre-check is output. This information includes the number of checked units and the number of items for which an error was detected. If no error was detected, 0 is output.

If you specify the -O or -M option, jobnets and jobnet connectors are also counted as checked units. If you specify any of the -C, -P, -H, -U, -D, or -A options, jobs are also counted.

The number of units subject to checking might be different from the number of checked units in the following case:

  • A definition pre-check process error occurred during checking.

    If a definition pre-check process error occurred during checking, the error message is output to the integrated trace log.

  • The connection source restriction function refused connection to the checked units.

    If the units to be checked are jobnet connectors with their Connection range set to Other service and the source restriction function is enabled on the destination host, the number of checked units will be reduced by the number of units whose connection was denied.

If an error occurred during the check, the error details are output to the integrated trace log. If different machines are being used for the JP1/AJS3 - Manager and the JP1/AJS3 - Agent, check the integrated trace log in the manager machine first. If no errors are found, check the integrated log in the agent machine.

Items (1) to (7) (information about the definition pre-check) and items (11) and (12) (execution end date and summary information) are output only once each time the command is executed. Item (9) (check results) is output for all error occurrences that were detected.