Setup standard traces for workload history
REQ=ATRAC THRDHIST TYPE=SUMMARY TITLE='THREAD HISTORY' * STORAGE=4000K LOGTRAC=Y TRNUMDS=3 TRSWTIME=24:00
This is a summary trace of the complete Db2 workload. It should be run as a standard request to provide viewing and printing of thread history. You can access this trace from the following locations:
- HTLOGs view hyperlink field Number of Records
- EZDB2 easy menu option Current Traces
- EZDBA easy menu option Traces - Current / ST
Because this trace adds very minimal overhead, it requires only the Db2 Accounting trace. The second line of the trace is a comment that shows you how you can define trace logging to a group of three data sets, automatically switching to a new data set at midnight. Depending on your Db2 workload volume and operations procedures, you might need to modify some of the keyword values or specify other values. All options are defined in the BBPARM member BLKDMRKY. To set default values for all traces, such as the volumes to be used for allocation, see Specification-of-trace-defaults.
If you choose to capture accounting data in the BMC AMI Ops Monitor for Db2 - Data Collector to support batch processing, you might want to keep a shorter online history in THRDHIST for quick analysis with the BMC AMI OpsM for Db2 trace displays. THRDHIST and the BMC AMI OpsM for Db2 - Data Collector data are available for online analysis through the Thread Workload History views. Because the BMC AMI OpsM for Db2 - Data Collector data is compressed, you might be able to keep more history available online through this option. You can use drilldown options to view the detailed accounting records for a selected interval.
Use one of the following methods to set up a continuously logging trace. Evaluate your system characteristics and choose the method that best meets your requirements.
Each time the trace request is started (at BBI-SS PAS startup), one or more new trace log data sets are allocated automatically, as shown in the preceding trace. Because no DSN is specified, the generated name will always be unique (specifying TRPREFIX in DMRBEXxx defines the hilevel node).
This method can be used if z/OS and the BBI-SS PAS are rarely brought down. However; if the log allocation fails, perhaps due to lack of space, the trace request also fails.
Set up a group of preallocated logs (any number of them) that are continually reused. An archive job can be defined to run automatically (log full, log switched, or trace complete) to save the data and mark that log for reuse. Each time the BBI-SS PAS starts, and this trace request is started, the next available log with the oldest data is chosen automatically for output.
This method uses fewer online log data sets. However; if you require archiving this method might require intervention after any unplanned outage of z/OS or the BBI-SS PAS as the archive job on the current log cannot run. If you do not require archiving, specify TRREUSE=Y to allow overwriting of a log without it being reset.
REQ=ATRAC BIGELAP TYPE=SUMMARY ELAP=10.0
This is an example of an exception trace that captures only those transactions or queries that run longer than 10 seconds. More exception filters can be added, or workload selection criteria can be added, such as DB2CONN=cicsjobname.