Before you open a performance monitor, a DB2 operator command can tell you whether the subsystem is drowning in threads, a table space is STOP, a buffer pool is too small, or a utility has been STOPPED since last night. This page is the monitoring subset of -DISPLAY: THREAD, DATABASE, BUFFERPOOL, GROUP, DDF, UTILITY, TRACE, STATS, and BLOCKERS — what to type and what the output is for.
Accounting and statistics traces tell you what happened over an interval. DISPLAY tells you what is true right now. Issue commands from a z/OS console (command prefix, often a hyphen), from DB2I COMMANDS, from DSN, or through IFI. In examples below, -DIS is the usual abbreviation.
| Command | Monitoring use |
|---|---|
| -DISPLAY THREAD | Who is in Db2: allied, DBAT, status, TOKEN |
| -DISPLAY DATABASE | Object status, RESTRICT, LOCKS, CLAIMERS, LPL |
| -DISPLAY BUFFERPOOL | Pool sizes and, with DETAIL, getpage/I/O stats |
| -DISPLAY GROUP | Data sharing members, levels, restart state |
| -DISPLAY DDF | DDF status, ports, connection and DBAT counts |
| -DISPLAY UTILITY | Active, stopped, or terminating utilities |
| -DISPLAY TRACE | Active IFC traces, classes, destinations, TNO |
| -DISPLAY STATS | FTB memory, index traverse, log reader tasks |
| -DISPLAY BLOCKERS | Threads holding locks or claims on named objects |
-DISPLAY THREAD lists threads: allied (TSO, CICS, IMS, batch CAF), database access threads (DBATs from DDF), and parallel child tasks. Status values you will live with:
1234-DISPLAY THREAD(*) -DISPLAY THREAD(*) DETAIL -DISPLAY THREAD(*) TYPE(INDOUBT) -DISPLAY THREAD(*) LOCATION(*)
Read AUTHID, PLAN, CONNID, CORRID, ASID, and TOKEN. TOKEN is what -CANCEL THREAD wants. DETAIL adds more SQL and elapsed clues. A sudden pile of ACTIVE CICS threads with the same PLAN is a loop or a missing syncpoint. A pile of INDOUBT after a CICS outage is a recover-indoubt problem, not a CPU problem.
-DISPLAY DATABASE shows RW/RO/STOP and restricted statuses on databases, table spaces, and index spaces.
12345-DISPLAY DATABASE(DBHR) SPACENAM(*) RESTRICT -DISPLAY DATABASE(DBHR) SPACENAM(TSHEMP) LOCKS -DISPLAY DATABASE(DBHR) SPACENAM(*) CLAIMERS -DISPLAY DATABASE(DBHR) SPACENAM(*) USE -DISPLAY DATABASE(DBHR) SPACENAM(*) LPL
Monitoring pattern: RESTRICT on the application databases every few minutes during the online day; LOCKS/CLAIMERS when a utility will not drain or SQL waits on a lock.
-DISPLAY BUFFERPOOL(bp) DETAIL is the live I/O picture: virtual pool size, sequential steal threshold, getpages, synchronous reads, prefetch reads, page writes. Hit ratio is approximately 1 − (synchronous reads / getpages) for random work — treat DISPLAY numbers as a snapshot, not a 15-minute SMF average.
123-DISPLAY BUFFERPOOL(*) -DISPLAY BUFFERPOOL(BP2) DETAIL -DISPLAY BUFFERPOOL(BP2) LIST
If DETAIL shows almost as many sync reads as getpages, the pool is too small or the object does not stay resident. Compare with accounting class 3 buffer-pool wait times later; DISPLAY is the “is it happening now” check.
In data sharing, -DISPLAY GROUP lists members, whether they are ACTIVE, the Db2 code level, catalog level, and function level. A member in a bad restart state belongs on the incident bridge before you tune SQL. DISPLAY GROUPBUFFERPOOL is the cousin for GBP hit ratios; GROUP itself is membership and levels.
-DISPLAY DDF shows whether DDF is started, the location name, IP and ports, and statistics for connections and threads DDF owns.
123-DISPLAY DDF -DISPLAY DDF DETAIL -DISPLAY DDF LOCATION(*)
Watch DBAT counts versus MAXDBAT, inactive connection reuse, and a location that is STOPPED when the network team says “the database is down.” DDF STOPD with CICS still healthy is a distributed-only outage.
-DISPLAY UTILITY(*) lists IBM utilities in ACTIVE, STOPPED, or TERMINATING status, with phase and sometimes percent. STOPPED means the utility job died while SYSUTILX still owns the control row — restart or TERM, do not start a second COPY on the same space. Long-running REORG in UNLOAD versus RELOAD tells you which phase to compare to last week’s baseline.
-DISPLAY TRACE(*) is how you find leftover performance traces. Output includes trace number (TNO), type (STAT, ACCTG, PERFM, AUDIT, MONITOR, GLOBAL), classes, destination (SMF, GTF, OPn, OPX), and filters. Monitoring shops DISPLAY TRACE after every change window. Stopping the wrong accounting class 1 trace is how you lose SMF 101 for the night — read TNO twice.
-DISPLAY STATS is not the statistics trace. It prints selected live resource counters:
123-DISPLAY STATS(INDEXMEMORYUSAGE) -DISPLAY STATS(INDEXTRAVERSECOUNT) -DISPLAY STATS(LRT) SCOPE(GROUP)
-DISPLAY BLOCKERS lists locks and claims that active threads hold against the databases, tables, indexes, or spaces you name. Use it when a utility cannot drain, a DROP hangs, or timeouts pile up and DISPLAY DATABASE LOCKS is too noisy. It answers “who is in my way?” not “what was the average lock wait last hour?” (that is accounting class 3).
Many shops automate:
DISPLAY does not replace SMF accounting. It keeps you from waiting an interval to learn that DSNDB06 is LPL or that MAXDBAT is full.
DISPLAY is looking through the classroom window right now. THREAD is “who is sitting in a chair.” DATABASE RESTRICT is “which desks have a ‘do not touch’ sign.” BUFFERPOOL is “how full is the toy box and how often we walk to the cupboard.” DDF is “is the front door unlocked for visitors.” UTILITY is “is the janitor still mopping.” TRACE is “did someone leave a video camera running.” BLOCKERS is “whose backpack is blocking the aisle.” The report card at the end of the day is SMF — different tool, different time.
1. Which DISPLAY command gives the TOKEN used by CANCEL THREAD?
2. -DISPLAY DATABASE(...) RESTRICT is typically the first look when:
3. DISPLAY BUFFERPOOL(...) DETAIL is for:
4. DISPLAY BLOCKERS shows:
5. DISPLAY STATS(INDEXMEMORYUSAGE) reports: