TSTAT-Trace Statistics
Note
Summaries of detail events can be produced for detail traces, but only when specifically requested with a parameter. Because of the amount of processing this can require, consider using the workload selection parameters first to limit the amount of data. The headings for detail summaries are displayed with no data if a detail trace does not select the events that make up the section (EVENTS NOT TRACED) or if there is no data to collect (NO EVENTS CAPTURED).
The following figure shows a representative display of the base section of the TSTAT view:
BMC SOFTWARE -------------- TRACE STATISTICS -----------PERFORMANCE MGMT
SERV ==> TSTAT INPUT 09:05:00 INTVL=> 3 LOG=> N TGT==> JXODEHF
PARM ==> T121608 ROW 1 OF 187 SCROLL=> CSR
DZ3135W - USE ,DTL FOR DETAIL DATA
ACCOUNTING: ELAPSED, SQLCOUNTS, BPOOL, LOCKS, PRLL, RTN, ACC, DDF
SUMMARIES: SCANS, IO/LOCK, SORTS
- - - - - - - - - - SUMMARY STATISTICS - ALL TRACE ENTRIES - - - - - - - - - -
-----TERMINATIONS ---------- ---------ACTIVITY------------------------------
FIRST END..13JUN 12.25.11.63 TOTAL AVERAGE MAXIMUM MINIMUM
LAST END...13JUN 12.37.59.01 -------- -------- -------- --------
NUMBER THREADS.............2 ELAPSED 00:26:21 00:13:10 00:13:34 00:12:47
COMMIT/ROLLBK.......2/.....0 ELP-DB2 00:21:28 00:10:44 00:11:01 00:10:27
NORMAL TERM................2 CPU 00:11:09 00:05:34 00:05:37 00:05:32
-- NEW USER................0 CPU-DB2 00:07:39 00:03:50 00:03:52 00:03:47
-- DEALLOC.................2 WAITS 00:09:37 00:04:48 00:04:51 00:04:46
-- APPL END................0 ZIIP CPU 0 us 0 us 0 us 0 us
-- RESIGNON................0 ZIIP-DB2 0 us 0 us 0 us 0 us
-- DBAT INACT..............0 ZIIP-EL. 0 us 0 us 0 us 0 us
-- DDF/RRSAF ROLLUP........0 SQL 44,000K 22,000K 22,000K 22,000K
ABNORMAL TERM..............0 GETPAGES 352 176 176 176
IN DOUBT TERM..............0 SYNC RDS 0 0 0 0
BUFFER HIT %..........VP=100 PFCH PGS 0 0 0 0
ZIIP USED/ELIGIBLE %. 0/ 0 UPD/COMT 0 0 0 0
ACC ELAP 00:25:37 00:12:49 00:13:11 00:12:26
The base section displays the trace status and key indicators of performance problems. From the base section you can access each section of the TSTAT view by hyperlinking on the section name in the view header, or by scrolling the view. The SCROLL field contains CSR and additional data can be seen by scrolling down with PF8/20. N/A in the SCROLL field indicates a summary trace.
TSTAT comprises the following sections:
Hyperlink | Section name | Description |
---|---|---|
Accounting sections: | ||
ELAPSED | Elapsed time analysis | Elapsed time data if accounting class 2 or 3 is active |
SQLCOUNTS | SQL statement execution counts | Statistics for the individual types of SQL statements executed |
BPOOL | Buffer pool activity | Buffer pool usage |
LOCKS | Lock activity | Lock usage |
PRLL | Parallelism | Parallel CPU and I/O activity |
RTN | Routines | Routine statistics if stored procedure calls have been issued |
ACC | Accelerator | Accelerator activity |
DDF | DDF summary | DDF statistics if there is DDF activity for the displayed thread |
Detail trace summary section: | ||
SCANS | Database summary | Database summary for all records |
IO/LOCK | Database lock and I/O summary | Synchronous reads and writes and lock suspensions |
SORTS | Sort summary | Summary of number of sorts, records sorted, sort elapsed time, and record size |
Note
The headings for detail trace summaries are shown with no data if the display is for a summary trace or if the ,DTL parameter is not specified for a detail trace.
The following figure shows a sample of the Accelerator section:
- - - - - - - - - - - - - - ACCELERATOR ACTIVITY - - - - - - - - - - - - - - -
--- Wait Time --- --- CPU Time ---- - Elapsed Time --
Category Total Average Total Average Total Average
----------------------- -------- -------- -------- -------- -------- --------
Accelerator 4,132 ms 2,066 ms 00:10:55 00:05:27 00:25:37 00:12:49
Accelerator Svcs 0 us 0 us 0 us 0 us
Accelerator Svcs TCP/IP 1,483 ms 742 ms 00:09:37 00:04:48
----- Sent ------ --- Returned ----
Total Average Total Average Total Average
-------- -------- -------- -------- -------- --------
Connections... 44 22.0 Bytes... 116,248 58,124.0 968,049K 484,025K
Requests..... 88 44.0 Messages 484 242.0 704 352.0
Timed Out... 0 0.0 Blocks.. 0 0.0 264 132.0
Failed...... 0 0.0 Rows.... 0 0.0 44,000K 22,000K
Stmts Sent To Acc Stmts Sent To Acc Accelerator Rows
Total Average Total Average Total Average
-------- -------- -------- -------- -------- --------
CREATE........ 0 0.0 INSERT.. 0 0.0 0 0.0
DROP......... 0 0.0 UPDATE.. 0 0.0 0 0.0
OPEN.......... 44 22.0 DELETE.. 0 0.0 0 0.0
COMMIT........ 0 0.0
ROLLBACK..... 0 0.0 Returned 0 0.0
Select code
TSTAT
Parameter
You can specify the following parameters:
Parameter | Description |
---|---|
trace id | A unique ID identifying the trace. The TSTAT trace ID must match the trace ID of the ATRAC request. You can use a blank if the ATRAC ID is also blank. This parameter is positional and a comma delimits the next parameter. For example, if there is no identifier, a comma must precede any other parameter. However, if there is an ID, it must be in the first position. |
,DTL | Selects the data for the Database Summary, the Database Lock and I/O Summary, and the Sort Summary sections when viewing a history trace. Warning This parameter requires a substantial amount of additional I/O. |
,A | AUTHID= xxxxxxxx | Selects a subset of the trace entries by AUTHID. Specify one AUTHID, or a generic group of AUTHIDs by replacing character positions with a + (one position) or an * (multiple positions). |
,C | CONNECT= xxxxxxxx | Selects a subset of the trace entries by connection name. Specify one connect type (TSO, BATCH, DB2CALL, imsid, cicsjobname), or a generic group of connections by replacing character positions with a + (one position) or an * (multiple positions). |
,P | PLAN= xxxxxxxx | Selects a subset of the trace entries by plan. Specify one plan, or a generic group of plans by replacing character positions with a + (one position) or an * (multiple positions). |
,L | LOC= xxxxxxxx | Selects a subset of the trace entries by location. Specify one location, or a generic group of locations by replacing character positions with a + (one position) or an * (multiple positions). |
,R | CORRID= xxxxxxxxxxxxxxxx | Selects a subset of the trace entries by correlation ID. Specify one correlation ID, or a generic group of correlation IDs by replacing character positions with a + (one position) or an * (multiple positions). |
,T | TIME= hhmm [ -hhmm ] | Selects a subset of the trace entries by a start time or time period; hhmm indicates hours and minutes. Midnight wrap is supported where the start time is higher than the end time; for example, TIME=2000-3000. The end time stamp of an accounting record is used to assign it a time period. Note If you request TSTAT for a trace log data set without specifying either a time qualification or the DTL parameter, only the summary statistics of the display are produced. This method enables you to control the amount of resources used to produce the TSTAT display. The entire TSTAT display is produced when the following conditions exist:
|
,D | DAY= nn [- -nn ] | Selects a subset of the trace entries by a day or range of days; nn can be a relative number from the date of the first accounting record in the trace buffer (first date = 1, up to a maximum of 99). If a time period is selected without a DAY specification, it uses the default value of the day of the most current record in the buffer. If there is data for only one day in the trace buffer, the format of the time stamp is hh:mm:ss. If there is data for more than one day, the format is dd-hh:mm, where dd is the relative day number from the date of the first accounting record in the trace buffer. Each accounting record traced is assigned to a time period based on its end time stamp. Therefore, the processing done for that unit of work is assigned to one interval, but it may have partially occurred during one or more previous time intervals depending on its elapsed time. Note Each keyword can be specified only once. If more than one selection keyword is specified, the result is ANDed. |
Service message
A message in the parameter field shows the sequence number of the first row of statistics displayed and the total number of rows that can be displayed by this scrollable service.
Expand
The TSTAT display can be EXPANDed to the following displays when the trace is being logged:
EXPAND option | Description | Section | Description |
---|---|---|---|
MON(WKLD) | Active Timer Requests display of all active monitors in the DB2 workload (WKLD) area | ||
HISTORY | Data from the current trace log data set for this trace (if you are viewing a current trace with logging, this provides access to data no longer in the online buffer). It is only shown when logging is active. | ||
CURRENT | Active trace data still in the buffers (if you are viewing a trace log data set for a still-active trace or a complete trace that has not yet been purged) | ||
ACCOUNTING | Format data from the DB2 accounting record | ELAPSED | TSTAT Elapsed Time Analysis display section (accounting classes 2 and 3 only) |
SQLCOUNTS | TSTAT SQL Statement Execution Counts display section | ||
BPOOL | TSTAT Buffer Pool Usage Analysis display section | ||
LOCKS | TSTAT Lock Activity display section | ||
PRLL | TSTAT Parallelism display section | ||
RTN | TSTAT Routines display section (only if stored procedure calls have been issued) | ||
DDF | TSTAT DDF Summary display section (available only if there is DDF activity for the displayed thread) | ||
SUMMARIES | Format data summarized from detail trace events and are available only if these events are traced | SCANS | TSTAT Database Summary display section |
IO/LOCK | TSTAT Lock and I/O Summary display section | ||
SORTS | TSTAT Sort Summary display section |
Key Indicators
The following table describes key indicators of failures or degradation in the order of importance.
Indicator | Description | Action | Field |
---|---|---|---|
These indicators show the cause of degradation and are highlighted | |||
TIMEOUT (or DEADLOCK) = nnnnnn | Indicates the number of units of work that failed because either a timeout condition or a deadlock condition was detected. TIMEOUT means that a unit of work was suspended for a length of time longer than permitted by installation options. DEADLOCK means that two units of work attempted to access the same resource and prevented each other from completing each process normally. | N/A |
|
STORED PROC. FAILED = nnnnnn | Indicates the number of times a stored procedure call failed. Possible reasons for failure are as follows:
| N/A |
|
RID FAILURE - STORAGE | Indicates the number of times RID list processing failed for the units of work in this trace because not enough storage was available. | Review the storage allocations specified when DB2 was installed. | QXNSMIAP |
RID FAILURE - NUMBER OF RIDS | Indicates the number of times RID list processing failed for the units of work in this trace because one of the internal limits was exceeded. The internal limits include the physical limit of the number of RIDs a RID list can contain and internal thresholds for the retrieval and manipulation of RIDs. | N/A | QXMRMIAP |
CLAIM FAILURE | Indicates the number of times CLAIM processing failed for the units of work in this trace. | N/A | QTXACLUN |
DRAIN FAILURE | Indicates the number of times DRAIN processing failed for the units of work in this trace. | N/A | QTXADRUN |
PARALLEL CPU FALLBACK - nnnnnn | Indicates the number of times parallel CPU processing was disabled for the units of work in this trace. | N/A |
|
PARALLEL I/O FALLBACK - nnnnnn | Indicates the number of times parallel I/O processing was turned off and sequential mode was used for the units of work in this trace. | N/A |
|
PARALLEL I/O REDUCED DEGREE - nnnnnn | Indicates the number of times Parallel I/O processing was reduced from the planned degree to a lesser degree because of insufficient storage or insufficient buffers in the buffer pool. | If this number is not zero, consider increasing the size of the buffer pool or specifying a different buffer pool for the table space. | QXREDGRP |
INCREMENTAL BINDS = nnnnnn | Indicates the number of incremental binds performed by the units of work in this trace. This message indicates that the plan/package had become invalid for some reason, such as an ALTER on an index or table. | Nothing needs to be done for this plan, but you might want to explicitly bind any plans whose tables/indexes are being altered. Incremental binds can have a significant impact in an online transaction system. | QXINCRB |
SEE RTN FOR MORE CPU/ELAPSED | Indicates that the total elapsed time may be less than the CPU time or DB2 wait time if stored procedures, user-defined functions, or triggers are present. | See the Routines (RTN) section for more information on stored procedures, user-defined functions, and triggers when any of them are present. | N/A |
TOTAL DDL = nnnnnn | Indicates the number of Data Definition Language (DDL) statements performed by the units of work in this trace. DDL statements, such as CREATE TABLE, can have a significant impact on system performance. To perform DDL operations, exclusive locks need to be obtained against the DB2 catalog. | In an online transaction system, avoid designing transactions that use DDL operations. |
|
BUFFER INCOMPLETE | Indicates at least one of the threads spans multiple trace log data sets. Accounting statistics data is available for those threads only in the last log, and detail trace data is incomplete in each log. However, accounting data in the final log is complete and represents the entire thread. The detail trace data in each log can be added together for total results. | Allocate a larger trace log data set. | N/A |
These indicators are informational in nature and are not highlighted. | |||
GRANTS/REVOKES = nnnnnn | Indicates the number of GRANT and REVOKE SQL statements issued by the units of work in this trace. | N/A |
|
zHyperlink eligible=n (PTFs BPD4919 and BPD4920 applied) | Indicates the number of read I/Os with DASD cache hits | Not applicable | QBACIOC |
zHyperlink used=n (PTFs BPD4919 and BPD4920 applied) | Indicates the number of read I/Os that used zHyperLink | Not applicable | QBACSYI |
IAG2 used=n (PTFs BPD4919 and BPD4920 applied) | Indicates whether Fast INSERT (IAG2) was used | Not applicable | QXRWSINSRTDAlg2 |
LOCK TABLE = nnnnnn | Indicates the number of LOCK TABLE SQL statements issued by the units of work in this trace. | Use LOCK TABLE carefully. It means that this unit of work owns exclusive control of the table, allowing no concurrent access. | QXLOCK |
LOCK ESCALATIONS = nnnnnn | Indicates the number of times the total locks per table have exceeded the installation limit for the units of work in this trace. When this limit is exceeded, DB2 promotes the current page locks to a single table space lock of the same type. | Lock escalation usually indicates that the application has encountered an exceptional condition. If this situation occurs frequently, the design of the application should be reviewed. |
|
PARALLEL I/O CONDITIONAL GETPAGE FAILURE | Indicates that a conditional GETPAGE request was not satisfied in a buffer pool. This condition can occur only for parallel I/O operations. When this condition occurs, it indicates that a prefetch operation failed to retrieve a page before the application required it. | N/A | QBACNGT |
SQL: SELECT= nnnnnn, FETCH= nnnnnn | Is a summary of the number of singleton SQL SELECTs, as well as FETCH statements, issued by this unit of work. Applications that only use cursor processing for the reading of data show FETCH statements but not SELECT statements. In a DDF environment, the number of FETCH statements might not truly reflect the number of FETCHes issued by the application due to internal DDF processing. | N/A |
|
SQL: INS= nnnnnn, UPD= nnnnnn, DEL= nnnnnn | Is a summary of the number of SQL INSERT, UPDATE, and DELETE SQL statements issued by the units of work in this trace. | N/A |
|
SQL: MERGE= nnnnnn, TRUNCATE= nnnnnn | Is a summary of the number of SQL MERGE and TRUNCATE SQL statements issued by the units of work in this trace. | N/A |
|
SQL: DYNAMIC(PREPARE)= nnnnnn | Is a summary of the number of PREPARE SQL statements issued by the units of work in this trace. Each PREPARE statement is equivalent to one dynamic SQL statement. In a DDF environment, the number of PREPARE statements might not truly reflect the number of dynamic SQL statements issued by the application due to internal DDF processing. | N/A | QXPREP |
I/O RSP: SYNC= time, ASYNC= time | Indicates the average I/O response times the units of work in this trace experienced for synchronous and asynchronous requests. | N/A | For synchronous requests:
For asynchronous requests:
|
DDF/RRSAF ROLLUP, LIMIT= nnnnnn, STG= nnnnnn, TIME= nnnnnn | Indicates the number of DDF or RRSAF threads terminated for the following reasons:
| N/A |
|
LOCK SUSPENSIONS = nnnnnn | Indicates the number of times a unit of work was suspended due to a lock or latch contention with another unit of work. This number should be small, ideally zero. | N/A |
|
PARALLELISM, MAINTASKS = nnnnnn, SUBTASKS = nnnnnn | Indicates that this trace contains units of work that are the primary, or originating, unit of work in a group supporting a query or utility using parallel tasks. MAINTASKS shows the total number of main tasks created to support queries or utilities using parallel tasks in this trace. SUBTASKS shows the total number of subtasks created to support queries or utilities using parallel subtasks in this trace. | N/A |
|
SYSPLEX PARALLELISM - COORDINATOR = nnnnnn | Indicates that queries are being processed across more than one DB2, where this DB2 was the coordinator. | N/A | QWDA |
SYSPLEX PARALLELISM - ASSISTANT = nnnnnn | Indicates that queries are being processed across more than one DB2, where this DB2 was an assistant. | N/A | QWDA |
NUMBER OF DISTRIBUTED LOCATIONS = nnnnnn | Indicates the number of separate DDF locations accessed by the units of work in this trace. | N/A | N/A |
RID LIST PROCESSING USED = nnnnnn | Indicates the number of times RID list processing was used for the units of work in this trace. During RID list processing, DB2 produces a list of candidate record IDs from an index. The resulting RID list can be used to efficiently retrieve the qualifying rows. | N/A | QXMIAP |
Comments
Log in or register to comment.