Documente Academic
Documente Profesional
Documente Cultură
3/16/2012
3/16/2012
3/16/2012
db2pd origins
After the acquisition of Informix, IBM converted the onstat tool and put it
into DB2 version 8.2 as db2pd.
db2pd runs quickly without any locks or latches and runs outside of the DB2
engine. No database connection is necessary.
This makes it possible to capture information that changes quickly without
negatively impacting the system.
Benefits include the collection of information without latching, faster
retrieval, and no competition for engine resources.
3/16/2012
3/16/2012
10
Controller Automatic: Y
Memory Limit:
14096056 KB
Current usage:
13810816 KB
HWM usage:
14036160 KB
Cached memory:
2072576 KB
Individual Memory Consumers:
Name
Mem Used (KB) HWM Used (KB) Cached (KB)
========================================================
APPL-DBNAME
26432
160000
5952
DBMS-db2inst1
44096
44096
5376
FMP_RESOURCES
22528
22528
0
PRIVATE
147584
180736
0
DB-DBNAME
13570048 13778560 2061248
LCL-p4294967295
128
128
0
3/16/2012
View Role, State, LogGapRunAvg, Primary log file, Standby log file.
HADR Information:
Role State
SyncMode HeartBeatsMissed LogGapRunAvg (bytes)
Standby Peer
nearsync 0
154126
ConnectStatus ConnectTime
Timeout
Connected Sat Mar 3 08:11:15 2012 (1330758675) 120
PrimaryFile PrimaryPg PrimaryLSN
S0058659.LOG 426
0x0000027CF4CC2B84
StandByFile StandByPg StandByLSN
StandByRcvBufUsed
S0058659.LOG 426
0x0000027CF4CC299D
0%
3/16/2012
Disk Value
AUTOMATIC(130240) AUTOMATIC(130240)
10
10
832
832
AUTOMATIC(98)
AUTOMATIC(98)
4022
4022
529
529
AUTOMATIC(105)
AUTOMATIC(105)
AUTOMATIC(4120) AUTOMATIC(4120)
3/16/2012
3/16/2012
Dynamic Cache:
Current Memory Used
1175280
Total Heap Size
3973120
Cache Overflow Flag
0
Number of References
1039
Number of Statement Inserts 73
Number of Statement Deletes 26
Number of Variation Inserts 49
Number of Statements
47
Dynamic SQL Statements:
Address
AnchID StmtUID NumEnv NumVar NumRef NumExe Text
0x00002B2417019EC0 111 1
1
1
1
1
SELECT POLICY FROM
SYSTOOLS.POLICY WHERE MED='DB2TableMaintenanceMED'
10
3/16/2012
Troubleshoot Locking
Locks being waited on :
AppHandl Type Mode Sts CoorEDU AppName AuthID AppID
2047
Row ..X
G 5160 db2bp VENUS *LOCAL.venus.071207213730
2046
Row .NS W 5913 db2bp VENUS
Status=G is the owner and Status=W is waiting
11
3/16/2012
UDI
RTSUDI
424431 424431
LobSize XMLSize
0
0
12
3/16/2012
These include size of indexes, scans, Index only scans, leaf splits.
Send output to a file usually.
13
3/16/2012
Includes total pages, usable pages, used pages, and free pages
Easily see if automatic resize is turned on and if it is an automatic storage
tablespace
2
Tablespace 3 Statistics:
TotalPgs UsablePgs UsedPgs PndFreePgs FreePgs HWM
State MinRecTime NQuiescers
19597216 19597184 19073984 0
523200 19073984 0x00000000 1331784495 0
Tablespace 3 Autoresize Statistics:
AS AR InitSize IncSize IIP MaxSize
No Yes 0
5
Yes None
LastResize
None
LRF
No
Containers:
Address
ContainNum Type TotalPgs UseablePgs StripeSet Container
0x00002B0C2B7B0080 0
File 19597216 19597184 0
/db2data/tblspaces/USER4K.dbf
14
3/16/2012
DatLRds DatPRds HitRatio TmpDatLRds TmpDatPRds HitRatio IdxLRds IdxPRds HitRatio TmpIdxLRds TmpIdxPRds HitRatio
2172094823 65639765 96.98% 6830323214 843479398 87.65% 549794315 13718139 97.50% 354109171 78
100.00%
DataWrts IdxWrts DirRds DirRdReqs DirRdTime DirWrts DirWrtReqs DirWrtTime
1183228552 2349724 1663208496 9904653 204391034 5321462 34514 344300
AsDatRds AsDatRdReq AsIdxRds AsIdxRdReq AsRdTime AsDatWrts AsIdxWrts AsWrtTime
846016377 72848156 2912247 194629 2478886149 1181375821 2057132 54288781
TotRdTime TotWrtTime VectIORds VectIOReq BlockIORds BlockIOReq FilesClose NoVictAvl UnRdPFetch
2778549431 64347648 831646395 69387765 0
0
0
1766351 4570976
15
3/16/2012
iteratively
db2pd option repeat 5 5
Use the file option to send output to a
filename
db2pd options file filename
For multi-partitions
db2pd options alldbpartitionnums
db2pd options dbpartitionnum 4
16
3/16/2012
Thank You
Brian Fairchild
bfairchild@xtivia.com
@fairchild_db2
17