STATISTICS command with TRACE subcommand

This section describes the STATISTICS command with the TRACE subcommand.

Usage

Use the TRACE subcommand to present statistics delta records.

Usage notes

  • Up to five traces can be requested in a job step.

Syntax of the TRACE subcommand

Read syntax diagramSkip visual syntax diagramTRACEFROM/TO blockLAYOUT(SHORTLONGname)NOEXCEPTIONEXCEPTIONDDNAME(STTRCDD*ddname)INCLUDE/EXCLUDE blockDSETSTATLOCSTATAPPSTATUSERSTATPROFSTAT

Subcommand options

The syntax diagram shows the options that are available with this subcommand. See Subcommand options for comprehensive descriptions of these options. The following list gives additional or specific descriptions of selected options, where appropriate.

FROM/TO
Limits the range of delta records included in the trace by date and time.

Combinations of FROM date and time, and TO date and time can be specified. Delta records are included from the first with an ending timestamp greater than or equal to the FROM date and time, to the last with an ending timestamp less than the TO date and time.

If you do not specify a date and time, FROM/TO defaults to the dates and times specified in the GLOBAL command. If FROM/TO is not specified in GLOBAL, all records are included in the trace.

The specified FROM/TO dates and times are printed on the trace. If FROM/TO is not specified in TRACE or GLOBAL, NOT SPECIFIED is printed on the trace. If only the FROM date and time or only the TO date and time has been specified, NOT SPECIFIED is printed for the unspecified value.

Note that GLOBAL FROM and TO filters individual Db2 Statistics records whereas TRACE FROM and TO filters delta records. For example, with a TRACE FROM time of 14:15, a delta record starting at 14:00 and ending at 14:30 would appear on the trace (based on the end delta record time). However, a GLOBAL FROM time of 14:15 would filter the Db2 Statistics records at 14:00 and the delta record (14:00 to 14:30) might not be created (subject to the BOUNDARY specification).

You can specify a time adjustment for a Db2 location using the TIMEZONE option of the GLOBAL command. The time adjustment is applied to the record timestamp before FROM/TO processing.

If you are reducing data, the FROM/TO times specified in REDUCE can affect the data available for tracing.

Refer to GLOBAL command for more information.

For details on how to use the FROM/TO option, see FROM/TO subcommand options.

LAYOUT
Specifies the name of a report layout. You can specify one of the supplied layouts or one that you have previously tailored:
SHORT
This is the default.
LONG
This option provides detailed thread-related data. You can also use other functions such as Record Trace and SQL Activity to find detailed Db2 trace data.
Historical Reporter migration layouts
Use the Historical Reporter migration layouts to help you identify OMEGAMON for Db2 PE data that was previously shown in the reports of the OMEGAMON® Historical Reporter. The migration layouts include:
User-defined layouts
You can customize your own report layouts by specifying which blocks of data and which fields within the blocks are included, and their relative order. To adapt the reports according to your requirements, you use user-tailored reporting (UTR). With UTR, you can control the volume, contents, and layout of Statistics traces and reports.

For information about tailoring report layouts, see the Reporting User's Guide.

EXCEPTION
NOEXCEPTION
Specify EXCEPTION if you want to report only those delta records on Statistics reports with at least one field in exception status. Otherwise, a standard report is produced.

If you use this subcommand option, your JCL must contain a valid DD definition for the ddname EXCPTDD. For more information about required ddnames, see Figure 1.

DDNAME
Specifies the data set where the trace is written. The default ddname for the first trace is STTRCDD1. The default ddnames for the second to fifth traces are STTRCDD2 through STTRCDD5.

You can specify a different ddname by using the DDNAME subcommand option in the TRACE subcommand. In this case, your JCL must contain a valid DD statement for the ddname you specify.

INCLUDE/EXCLUDE
Includes or excludes data associated with specific OMEGAMON for Db2 PE identifiers.

For details, see INCLUDE and EXCLUDE subcommand options, which lists other identifiers allowed with this command and subcommand combination, and OMEGAMON for Db2 PE identifiers.

DSETSTAT
Include buffer pool data set statistics.
LOCSTAT
Include remote location statistics. IFCID 365 externalization is controlled by system parameter STATIME and can range from 1 to 60 minutes. Interval metrics for remote location statistics can be obtained from Statistics TRACE or FILE data created with LOCSTAT.
Note: Input must contain IFCIDs 1, 2, and 365 for the remote location statistics to be generated.
APPSTAT
Generates information from IFCID 411 which records detailed statistics about the application that connects to a Db2 subsystem. The interval at which the IFCID 0411 records are produced is controlled by the STATIME_MAIN subsystem parameter.
USERSTAT
Generates information from IFCID 412 which records detailed statistics about the client userid that connects to a Db2 subsystem. The interval at which the IFCID 0411 records are produced is controlled by the STATIME_MAIN subsystem parameter.
PROFSTAT
Include Profile Monitoring statistics from IFCID 402. The interval at which the IFCID 0402 records are produced is controlled by the STATIME subsystem parameter. For a specific profile, IFCID 402 tracks any profile warning or exception that occurred during a statistics interval.

Example using TRACE with DSETSTAT, LAYOUT, and DDNAME

This example:
  • Includes the buffer pool data set statistics.
  • Specifies the default (short) report format.
  • Writes the data to the STTRCDD1 dataset.
.
.
TRACE
	DSETSTAT
	LAYOUT(SHORT)
	DDNAME(STTRCDD1) 
.
.