Monitor trace
The monitor trace enables attached monitor programs to access Db2 trace data through calls to the instrumentation facility interface (IFI). Monitor programs can access the trace data asynchronously through an OPx buffer by issuing READA requests, or synchronously in the monitor return area by issuing READS requests.
Monitor trace has the following predefined trace classes that are used explicitly for monitoring. The following table shows the IFCIDs activated for each monitor trace class.
| Class | Description of class | Activated IFCIDs |
|---|---|---|
| 1 | Standard accounting data. This default class is also
activated when you omit the CLASS keyword from the START TRACE command when you
start the monitor
trace. |
0200 |
| 2 | Entry or exit from Db2 event signaling. The information can be obtained by issuing a READS request for IFCID 0147 or 0148. In addition, monitor trace class 2 information is available in IFCID 0003 in the accounting record. Monitor class 2 is equivalent to accounting class 2 and results in equivalent overhead. Monitor class 2 times appear in IFCIDs 0147, 0148, and 0003 if either monitor trace class 2 or accounting class 2 is active. |
0232 |
| 3 | Db2 wait time for I/O, locks; resource usage
information. The information can be obtained by issuing a READS request for IFCID 0147 or 0148. In addition, monitor trace class 3 information is available in the accounting record, IFCID 0003. As with monitor class 2, monitor class 3 overhead is equivalent to accounting class 3 overhead. When monitor trace class 3 is active, Db2 can calculate the duration of a class 3 event, such as when an agent is suspended due to an unavailable lock. Monitor class 3 times appear in IFCIDs 0147, 0148, and 0003, if either monitor class 3 or accounting class 3 is active. |
0006-0009, 0032, 0033,0044, 0045, 0117, 0118, 0127, 0128, 0170, 0171, 0174, 0175, 0213,0 214, 0215, 0216, 0226, 0227, 0242, 0243, 0321, 0322, 0378, 0379, 0382, 0383 |
| 4 | Installation-defined monitor record. | 0155 |
| 5 | Time spent processing IFI requests. | 0187 |
| 6 | Changes to tables created with DATA CAPTURE CHANGES. | 0185 |
| 7 | Entry or exit from Db2 event signaling for package accounting. The data
traces the amount of time an agent spent in Db2 to process each package. If monitor trace class 2 is active, activating class 7 has minimal performance impact. Class 7 enables the IFCID 0239 to be externalized. |
0200, 0232, 0240 |
| 8 | Wait time for a package. If monitor trace class 3 is active, activating class 8 has minimal performance impact. Class 8 enables the IFCID 0239 to be externalized. |
0006-0009, 0032, 0033, 0044, 0045, 0051, 0052, 0056, 0057, 0117, 0118, 0127, 0128, 0170,171,174, 175, 213-216, 226, 227, 239, 241-243, 321, 322, 0378, 0379, 0382, 0383 |
| 9 | Enables statement level accounting. Provides information about statement details in IFCID 0148. |
0124 |
| 10 | Package detail for buffer manager, lock manager and SQL statistics.
It contains the same information as accounting class 10. Monitor records do not include class 10, but it shows up in IFCID 0003 in the accounting record. Information from class 10 is written in additional sections of IFCID 0239. However, monitor class 7 or 8 must be activated for IFCID 0239 to be written. One of the following traces must also be activated before the IFCID 0239 records are written:
|
0239 |
| 11 | Plan-level accounting information. This class is activated when you
omit the CLASS keyword from the START TRACE command when you start the monitor
trace. |
0003, 0200 |
| 12-28 | Reserved. | |
| 29 | Controls the
subsystem-wide collection of statistics for SQL statements. When monitor class 29 is activated, trace records are written for the following events:
|
0316 , 0318, 0400, 0401 |
| 30 - 32 | Available for local use. |