2.9.3 How to specify commands during cluster operation
To execute a command on a logical host, you must specify the logical host name in the command. A command in which no logical host name is specified is executed on the physical host. Specify the logical host in commands as shown in the following.
- Organization of this subsection
(1) adshexec command (executes a batch job)
(a) Executing from a JP1/AJS custom job
To execute the command from a custom job, select the Logical host check box in Define detailed info in the Define Details - [Custom Job] dialog box to execute the command on the logical host.
Note that the JP1/AJS Exec-agent that executes the custom job must be running on the logical host. If the JP1/AJS Exec-agent is running on the physical host, the command will not function normally.
For details about custom jobs, see 2.7 Specifying environment information for JP1/AJS (applicable when JP1/AJS is used).
(b) Executing from a program other than a JP1/AJS custom job
To execute the command from a program other than a custom job, specify the command as follows:
adshexec -h "" path-name-of-job-definition-script-file
If the command is executed from JP1/AJS - Agent running on the logical host, the logical host name is set in the JP1_HOSTNAME environment variable. If the null character string (which is two double-quotation marks, "") is specified in the -h option, the adshexec command acquires the logical host name from the JP1_HOSTNAME environment variable. For details about the JP1_HOSTNAME environment variable, see the JP1/Base User's Guide.
Note that the executing JP1/AJS Exec-agent must be running on the logical host. If the JP1/AJS Exec-agent is running on the physical host, see Executing from a program other than JP1/AJS below.
(c) Executing from a program other than JP1/AJS
Execute the command with the logical host name specified in the -h option, as shown in the following:
adshexec -h logical-host-name path-name-of-job-definition-script-file
(2) Commands other than adshexec
Execute the command with the logical host name specified in the -h option, as shown in the following:
command -h logical-host-name
This example executes adshlsmsg as a logical host:
adshlsmsg -h logical-host-name
If the user-reply functionality is used, the logical host name specified in the user-reply functionality's management daemon or service must the same as the logical host name specified in the adshexec command. For details about the individual commands that can be executed as a logical host, see 8.3 Shell operation commands.