Job level debugging

Document ID : KB000089649
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Job level debugging
Resolution:
Applicable to Application Manager version 7.1 & 8.0

Detailed Description and Symptom

Standard Applications Manager (AM) jobs all run the BODY script during their execution. If failures are encountered during running/execution of specific jobs (or kinds of jobs), job level debug proves as an invaluable tool to identify and isolate the portion of the job that is resulting in the error.

The jobs standard output file (no debug enabled) can be used to identify if the failure is specific to 'BODY' portion of the execution. The start of this portion's execution can be identified by a line similar to the one below:

BODY starting at Tue 10/12/2010 6:56:51.21

Enabling job level debug will help in troubleshooting any subsequent errors in this portion.

The BODY script is located in the $AW_HOME/exec directory of both the Master and Agent machine.


Investigation

Job level debug can be enabled by creating a 0 byte file called BODY in the $AW_HOME/debug directory. As the $AW_HOME/debug directory is not created as part of the standard install it is something that will need to be manually created.


Solution

A small portion of the $AW_HOME/exec/BODY script that controls the writing of debug to the standard output file(s) is provided below:

if [ -f $AW_HOME/debug/BODY ]; then

 BODY=$AW_HOME/tmp/BODY.$$

 exec 1>>$BODY 2>&1

 set –x

As seen above, the first line is checking for the existence of $AW_HOME/debug/BODY and the last line issues a 'set –x' so that additional information is then written to the standard out (jobs output) file.