Monitoring and canceling jobs

This section explains how you can monitor and cancel jobs using the Dynamic Workload Console or the conman command.

You can use the Dynamic Workload Console or the conman command line to monitor the status of submitted jobs, retrieve the job output, and cancel jobs if necessary, as you normally do in HCL Workload Automation. You can also use the Dynamic Workload Console to view their status since it provides more detail on jobs processed through HCL Workload Automation.

Job statuses in Dynamic workload broker correspond to the following statuses in HCL Workload Automation:
Table 1. Status mapping between Dynamic workload broker and HCL Workload Automation
Dynamic workload broker job status HCL Workload Automation job status
  1. Run failed
  2. Unable to start
  3. Resource allocation failed
  4. Unknown
  1. ABEND
  2. FAILED
  3. FAILED
  4. ABEND
  1. Submitted
  2. Submitted to Agent
  3. Resource Allocation Received
  4. Waiting for Reallocation
  5. Waiting for Resources
  1. INTRO
  2. WAIT
  3. WAIT
  4. WAIT
  5. WAIT
  1. Running
  1. EXEC
  1. Completed Successfully
  1. SUCC
  1. Canceled
  2. Cancel Pending
  3. Cancel Allocation
  1. ABEND
  2. The status is updated when the job reaches the Canceled state in HCL Workload Automation
  3. The status is updated when the job reaches the Canceled state in HCL Workload Automation
Note: The + flag written beside the INTRO and EXEC statuses means that the job is managed by the local batchman process.

You can view the job output by using both the Dynamic Workload Console or the conman command-line.

Consider the following Job Submission Description Language (JSDL) example, called BROKER_COMMAND_JOB:

<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdl" 
xmlns:jsdle="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdle" 
                            name="BROKER_COMMAND_JOB">
 jsdl:variables>
  <jsdl:stringVariable name="command">dir</jsdl:stringVariable>
  <jsdl:stringVariable name="params">d</jsdl:stringVariable>
 </jsdl:variables>
 <jsdl:application name="executable">
  <jsdle:executable interactive="false">
   <jsdle:script>${command} ${params}</jsdle:script>
  </jsdle:executable>
 </jsdl:application>
</jsdl:jobDefinition>

and the associated HCL Workload Automation job definition, called TWS_COMMAND_JOB:

 TTANCRED_BRK#TWS_COMMAND_JOB
 SCRIPTNAME "BROKER_COMMAND_JOB -var command=ping, 
             params=ttancred.romelab.it.abc.com"
 STREAMLOGON tws86master
 TASKTYPE BROKER
 RECOVERY STOP
The following example displays the output of the previous job, submitted from HCL Workload Automation to the workload broker workstation.
%sj TTANCRED_DWB#JOBS.TWS_COMMAND_JOB;std

====================================================================================
= JOB       : TTANCRED_DWB#JOBS[(0000 10/28/12),(JOBS)].TWS_COMMAND_JOB
= USER      : twa86master
= TASK      : ?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdl" 
xmlns:jsdle="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdle" 
                       name="BROKER_COMMAND_JOB">
 jsdl:variables>
  <jsdl:stringVariable name="command">dir</jsdl:stringVariable>
  <jsdl:stringVariable name="params">d</jsdl:stringVariable>
 </jsdl:variables>
 <jsdl:application name="executable">
  <jsdle:executable interactive="false">
   <jsdle:script>${command} ${params}</jsdle:script>
  </jsdle:executable>
 </jsdl:application>
</jsdl:jobDefinition>
= AGENT     : TTAGENT
= Job Number: 318858480
= Wed Oct 24 15:58:24 CEST 2012
====================================================================================
Pinging ttancred.romelab.it.abc.com [9.168.101.100] with 32 bytes of data:

Reply from 9.168.101.100: bytes=32 time<1ms TTL=128
Reply from 9.168.101.100: bytes=32 time<1ms TTL=128
Reply from 9.168.101.100: bytes=32 time<1ms TTL=128
Reply from 9.168.101.100: bytes=32 time<1ms TTL=128

Ping statistics for 9.168.101.100:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

====================================================================================
= Exit Status           : 0
= Elapsed Time (Minutes) : 1
= Job CPU usage (ms) : 1406
= Job Memory usage (kb) : 3940
= Wed Oct 24 15:58:27 CEST 2012
====================================================================================
The keywords in the job output are as follows:
JOB
Is the host name of the HCL Workload Automation agent to which the job has been submitted and the job name.
USER
Is the HCL Workload Automation user who submitted the job to the workload broker workstation. When a scheduled job is submitted, the user name is retrieved from the STREAMLOGON keyword specified in the job definition. When an ad-hoc job is submitted from conman and the logon is not specified, the user name corresponds to the user who submitted the job.
TASK
Is the full JSDL job submitted with all the variables substituted.
AGENT
Is the agent that run the job.
Job Number
Is the job number.
Exit Status
Is the status of the job when completed.
System Time
Is the time the kernel system spent for the job.
User Time
Is the time the system user spent for the job.
Note: The same job output format is used for JSDL template job types.

You can also kill the job after submitting it. Killing a job in HCL Workload Automation performs the same operations as issuing the cancel command in HCL Workload Automation.