The sections of the trace output
Trace records can be written to SMF or GTF.
In both cases, the record
contains up to four basic sections:
- An SMF or GTF writer header section
- A self-defining section
- A product section
- Zero or more data sections
The following figure shows the format of Db2 trace records.
The writer header section begins at the first byte of the record and continues for a fixed length. (The GTF writer header is longer than the SMF writer header.)
The self-defining section follows the writer header section (both GTF and SMF). The first self-defining section always points to a special data section called the product section. Among other things, the product section contains an instrumentation facility component identifier (IFCID). Descriptions of the records in the data section differ for each IFCID.
The product section also contains field QWHSNSDA, which indicates
how many self-defining data sections the record contains. You can
use this field to keep from trying to access data sections that do
not exist. In trying to interpret the trace records, remember that
the various keywords you specified when you started the trace determine
whether any data is collected. If no data has been collected, field
QWHSNSDA shows a data length of zero.