Chapter 18: Remote Execution Jobs
Remote Execution Jobs
Remote Execution jobs let you execute commands to a remote UNIX, HP Integrity
NonStop, or OpenVMS computer through Secure Shell (SSH2) or Telnet.
Note: To run these jobs, your system requires CA WA Agent for UNIX, Linux, or Windows
and CA WA Agent for Remote Execution. The CA WA Agent for Remote Execution
supports only remote target environments of UNIX, HP Integrity NonStop, and
OpenVMS.
Define a Remote Execution Job
You can define a Remote Execution (PROXY) job to run commands to a remote UNIX, HP
Integrity NonStop, or OpenVMS computer through Telnet or Secure Shell (SSH2).
Note: To run these jobs, your system requires CA WA Agent for UNIX, Linux, or Windows
and CA WA Agent for Remote Execution. The CA WA Agent for Remote Execution
supports only remote target environments of UNIX, HP Integrity NonStop, and
OpenVMS.
With the CA WA Agent for Remote Execution, you can define and run remote execution
jobs.
Follow these steps:
1. Insert a job and specify the following attributes in the definition:
job_type: PROXY
Specifies that the job type is Remote Execution.
machine
Specifies the name of the machine on which the job runs.
remote_command
Specifies a command or script to run on a remote computer.
remote_target
Specifies the name of the custom properties (remote_target.properties) file
that is created on the agent for the remote system. The file contains the
default user credentials that are used to monitor all jobs run on the target
machine by the agent. The name should not include the .properties extension.
2. (Optional) Specify optional Remote Execution attributes:
■ envvars
■ fail_codes
■ job_class
■ spool_file
■ submit_modifier
■ success_codes
3. (Optional) Specify the following attribute:
owner
Specifies the user ID that the job runs under. This value overrides the default
owner of the job.
Default: The user ID who invokes jil to define the job
4. (Optional) Specify common attributes that apply to all jobs.
The Remote Execution job is defined.
Notes:
■ Attributes that have a default value automatically apply to the job definitions;
therefore, they are optional. For example, jobs with no specified job type are
defined as command jobs by default. Other optional attributes specify information
that is not required but affects how or when a job runs, such as attributes that
specify scheduling conditions.
■ Some optional attributes are common to all job types but others apply to certain
jobs types only. Optional attributes that apply to all job types are known as
common optional attributes. For more information about common optional
attributes and the values that you can specify for them (including their default
values when applicable), see the Reference Guide.
■ For information about required attributes and job type specific optional attributes,
see the procedure topics that provide instructions for defining jobs.
■ This guide provides instructions for defining jobs interactively. You also create job
definitions in script files and then import them using the jil command or use CA
WCC to define them. For more information about the JIL command and JIL syntax,
see the Reference Guide. For more information about using CA WCC to define the
job, see the CA Workload Control Center Workload Scheduling Guide.
Attributes with Default Values
Chapter 18: Remote Execution Jobs 417
Example: Execute the list command on a remote machine
Suppose you want to list the contents of /opt on the remote agent machine.
insert_job: proxy_job
job_type: PROXY
machine:agentmachine
owner: root@remoteagent
remote_target: remoteagent
spool_file: /opt/spool/commandout.out
remote_command: ls /opt
Attributes with Default Values
Attributes that have a default value automatically apply to the job definition. Therefore,
you do not have to specify those attributes in the definition. Default values for some
attributes can be defined on the agent in the custom properties file for the remote
system. If you specify the attribute in the job definition, it overrides the default value
defined on the agent. For more information about possible default values, see the
syntax and notes for the attributes you are using.
If you specify the attribute in a job definition, it overrides the default.
The following Remote Execution job attributes have default values:
fail_codes
Defines which exit codes indicate job failure.
Default: Any exit code other than 0 (The job interprets any code other than zero as
failure.)
spool_file
Specifies the path to the spool file.
Default: spoolHome custom property
owner
Specifies the user ID that the job runs under.
Default: The default owner (the user ID who invokes jil to define the job)
success_codes
Defines which exit codes indicate job success.
Default: 0 (The job interprets zero as success.)
Note: For more information about JIL job types and other job definition attributes, the
values that you can specify for those attributes, and JIL syntax, see the Reference Guide.
Attributes with Default Values
418 User Guide
Example: Override the Default Path to the Spool File
This example overrides the default path to the spool file specified in the custom
properties file for the remote system.
insert_job: ls_cmd
job_type: PROXY
machine: proxyagent
remote_target: hpserver
remote_command: ls
spool_file: >>/home/user1/test/ls.out
No comments:
Post a Comment
Note: only a member of this blog may post a comment.