Using the External Command Interface to Monitor Jobs
The Teradata PT Asynchronous Command Interface is a software component, through which you can issue commands to Teradata PT jobs at runtime. The term asynchronous implies two important things:
- That you can issue commands to Teradata PT jobs from outside the Teradata PT address space; thus the term external commands.
- That Teradata PT processes commands in an asynchronous manner, while it is in the middle of performing loading or exporting operations.
The purpose of the external commands you issue include, but are not limited to, the following:
- Suspending and resuming a job to allow for better management of load time and system resources
- Taking a checkpoint on a demand or timely basis
- Terminating a job in a graceful manner for later restart
- Obtaining the status of a job on a demand basis
- Committing transactions that are in-flight by taking an immediate checkpoint
- Defining external procedures or rules for driving external commands
- Synchronizing multiple data targets that can be loaded concurrently
- Collecting operational metadata such as performance statistics, source or target information, job events, and so on, which can be stored in relational tables
External commands can be targeted to different Teradata PT execution levels, that is, the job level and the operator level. The different level-of-command execution gives you more flexibility in defining monitoring and modification procedures for controlling job execution, regulating system resource usage, and refining job performance.
Using the TWB_STATUS Private Log to Obtain Job Status
When a job runs, Teradata PT creates a special log called the TWB_STATUS log to capture job performance data at different stages of the job. These stages, known as "processing methods," include:
- Initialization of operators (INITIATE method)
- Data acquisition performed by the operators (EXECUTE method)
- Checkpoint processing (CHECKPOINT method)
- Restart processing (RESTART method)
- Termination of operators (TERMINATE method)
By default, Teradata PT collects performance data for each instance of the operator at the beginning and end of each method. You can view the performance data in the TWB_STATUS log as a relational table, which contains the following fields:
- The name of the job step
- The name of the operator
- Instance number
- Processing method
- Start time of a method
- End time of a method
- CPU utilization (in seconds) for a method
- Number of buffers transferred since the beginning of data acquisition
- Number of rows sent (or received) by the instance since the beginning of data acquisition
This information is useful for evaluating job performance in terms of throughput and the cost of performing the exporting and loading of data by each operator. The information is also useful for capacity planning when performance data, collected for a period of time, summarizes the CPU utilization and elapsed time for each job, so you can determine performance trends for the overall loading and exporting processes.