Statistics trace

The statistics trace reports information about how much the Db2 system services and database services are used.

Begin program-specific programming interface information.

You can use the information that the statistics trace provides to plan Db2 capacity, or to tune the entire set of active Db2 programs.

If you specify YES for the SMF STATISTICS entry in panel DSNTIPN, the statistics trace uses classes 1, 3, 4, 5, and 6 as the defaults. If the statistics trace is started using the START TRACE command, the statistics trace uses class 1 as the default.

The following table describes the Db2 statistics trace classes.

If you specify YES for the SMFSTAT subsystem parameter, the statistics trace starts automatically when you start Db2, and sends the default classes (classes 1, 3, 4, 5, and 6) statistics data to SMF. SMF records statistics data in both SMF type 100 and 102 records. Start of changeIFCIDs 0001, 0002, 0202, 0225, 0230, and 0369 are of SMF type 100. All other IFCIDs in statistics trace classes are of SMF type 102. End of change

When you specify CLASS(7) or IFCID(365) in a START TRACE or MODIFY TRACE command, Db2 writes IFCID 0365 records. These records are written to the specified destination of the statistics trace for remote locations that communicate with the subsystem. Statistics are generated only for those locations that have activity since the record was generated. The location statistics are written each time that the STATIME interval elapses. Statistics can be written for as many as 95 remote locations.

Db2 also writes statistics about all DRDA locations with the other default statistics trace data to a single SMF location named DRDA REMOTE LOCS, whenever other default statistics are written.

Statistics trace classes

The following table shows the IFCIDs that are activated for each statistics trace class.

Tip: Start of changeIFCID numbers are often presented in Db2 and its documentation with three or four digits and leading zeros. For example, you might find: "IFCID 1," "IFCID 001," or "IFCID 0001." However, you can assume that these references each have the same meaning.End of change
Table 1. Classes for Db2 statistics trace
Class Description of class Activated IFCIDs
1 Start of changeInformation about system services, database statistics, statistics for the database services address space (ssnmDBM1), aggregated CPU and wait time statistics by connection type, and information about the system parameters that were in effect when the trace was started.End of change

Class 1 is also activated when you omit the CLASS keyword from the START TRACE command when you start the statistics trace.

1, 2, 105, 106, 202, 225, 369
2 Installation-defined statistics record 152
3 Deadlock, lock escalation, group buffer pool, data set extension information, and indications of long-running uncommitted reads, and active log space shortages. 172, 196, 250, 258, 261, 262, 313, 330, 335, 337
4 Db2 exceptional conditions. 173, 191, 192, 193, 194, 195, 203, 204, 205, 206, 207, 208, 209, 210, 235, 236, 238, 267, 268, 334, 343, 402
5 Db2 data sharing statistics. 230, 254
6 Storage statistics for the Db2 subsystem. 225
7 DRDA location statistics. 365
8 Data set I/O statistics. 199 Start of change, 389End of change
9 Aggregated CPU and wait time statistics by connection type. 369
Start of change10End of change Start of changeDRDA remote application statistics based on the CURRENT CLIENT_APPLNAME special register. Client inventory information.End of change Start of change411End of change
Start of change11End of change Start of changeDRDA remote user statistics based on the CURRENT CLIENT_USERID special register. Client inventory information.End of change Start of change412End of change
12–29 Reserved.  
30–32 Available for local use.  
End program-specific programming interface information.

Intervals for collecting Db2 statistics trace records

Start of changeDb2 collects statistics trace records for the following IFCIDs at the interval specified by the STATIME_MAIN subsystem parameter. For more information, see MAIN STATS TIME field (STATIME_MAIN subsystem parameter).
  • 1 (System statistics)
  • 2 (Db2 statistics)
  • 202 (Buffer Pool Attributes)
  • 225 (Storage statistics)
  • 230 (Group Buffer Pool Attributes)
  • 254 (Coupling Facility Cache statistics)
  • 369 (Wait and CPU time aggregated by connection type)
End of change
Start of changeDb2 collects statistics trace records for the following IFCIDs at the interval specified by the STATIME_DDF subsystem parameter. For more information, see DDF STATS TIME field (STATIME_DDF subsystem parameter).
  • 365 (Remote location statistics)
  • 411 (Remote application statistics based on CURRENT CLIENT_APPLNAME)
  • 412 (Remote user statistics based on CURRENT CLIENT_USERID)
End of change
Db2 collects statistics trace records for the following IFCIDs at the interval specified by the STATIME and SYNCVAL subsystem parameters. For more information, see STATISTICS TIME field (STATIME subsystem parameter) and STATISTICS SYNC field (SYNCVAL subsystem parameter).
  • 105 (Db2 performance trace)
  • 106 (system parameters)
  • 199 (data set statistics)
  • 402 (monitor profile warnings or exceptions)
Start of change

Statistics trace field (IFCID) descriptions

You can find descriptions of trace records in the IFCID flat file (DSNWMSGS). The most current version of DSNWMSGS is available only for clients who have Db2 12 for z/OS® licenses. The information is in a PDF file. To locate this information, see Db2 12 for z/OS IFCID flat file (DSNWMSGS).

End of change