Submitting jobs to run commands on a remote host
You can submit the Run command on remote host job to run command-line utilities such as startServer, wsadmin commands, or operating system commands on a remote host. A WebSphere® Application Server installation on the remote host is required to run product commands, but is not required for non-product commands.
Before you begin
Before you can run the Run command on remote host job, complete the following steps:
About this task
You can use the administrative console of the job manager or the deployment manager to submit a job that runs commands on a remote host. From the console, choose the Run command on remote host job, specify the remote host computer, specify the command to run, review the summary, and submit the job. After the job submission, the job manager runs the specified command and records any messages in job manager stdErr.txt or stdOut.txt logs.
The
Run command on
remote host job supports executing QShell command on IBM
i target hosts.
Instead of using a console, you can run the runCommand job script in the AdministrativeJobs command group. See the Administrative job types topic.
To run wsadmin commands in jobs, you can also use the Run wsadmin script job, which additionally enables you to specify script parameters. See information about submitting jobs to run wsadmin scripts.
Procedure
Results
The job manager runs the job. If the job options specify the command name and path correctly, the command runs on the host and any messages resulting from the command are written to job manager logs.
For the versionInfo example, a message such as the following is written to the stdOut.txt file in the profile_root/JobMgr01/config/temp/JobManager/job_ID/host_name/logs directory:
--------------------------------------------------------------------------------
IBM WebSphere Product Installation Status Report
--------------------------------------------------------------------------------
Report at date and time August 30, 2010 11:20:50 AM EDT
Installation
--------------------------------------------------------------------------------
Product Directory C:\WAS_v850\IBM\WebSphere\AppServer
Version Directory C:\WAS_v850\IBM\WebSphere\AppServer\properties\version
DTD Directory C:\WAS_v850\IBM\WebSphere\AppServer\properties\version\dtd
Log Directory C:\Documents and Settings\All Users\Application Data\IBM\Installation Manager\logs
Product List
--------------------------------------------------------------------------------
ND installed
Installed Product
--------------------------------------------------------------------------------
Name IBM WebSphere Application Server - ND
Version 8.0.0.0
ID ND
Build Level build_2464
Build Date 8/17/10
Architecture x86 (32 bit)
Installed Features EJBDeploy tool for pre-EJB 3.0 modules
Sample applications
Stand-alone thin clients and resource adapters
--------------------------------------------------------------------------------
End Installation Status Report
--------------------------------------------------------------------------------
For the startServer example that starts server1, the command starts server1 on the host. A message such as the following is written to the stdOut.txt file in the profile_root/JobMgr01/config/temp/JobManager/job_ID/host_name/logs directory:
ADMU0116I: Tool information is being logged in file
C:\WAS_v850\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\startServer.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU3100I: Reading configuration for server: server1
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server server1 open for e-business; process id is 5384
What to do next
On the Job status page, click the ID of the runCommand job and view the job status. If the job is not successful, view any error messages that result from running the job, correct the error condition, and submit the job again.