db2pd - A db2 monitoring and troubleshooting tool.

发布时间 2023-06-20 09:00:45作者: 耀阳居士

db2pd - A db2 monitoring and troubleshooting tool.

 

In this blog we will see and learn about one of the important db2 tool which a DBA use it on daily basis. The db2pd command is a powerful tool for monitoring and administering DB2 Linux, UNIX and Windows databases and instances. You can use this tool to keep track of transactions, table spaces, table statistics, dynamic SQL, configuration settings and much, much more.

 
 
 
 

We can use plenty of options with db2pd for retrieving information about operating systems, dynamic SQL, table statistics, database partitions, and also including information about storage, configuration, recovery processes, HADR status, and many more. Below are few examples of troubleshooting DB2 issues using db2pd :

 

 

 

1) To get DB2 instance uptime

 
db2pd -
 
 
 
 

2) To get OS information

 
db2pd -osinfo
 
 
 
 

3) To get DB2 level

 
db2pd -V
db2pd -version
 
 
 
 

4) To get almost everything db2 databases details

 
db2pd -d <database name>
db2pd -everything
 
 
 
 
 
 
 

5) To get useful information about database logs

 
db2pd -db <database name> -logs
 
 
 
 

6) To get db2 database lock information

 
db2pd -db <database name> -locks
 
 
 
 

7) To get more diagnostic lock information

 
db2pd -db <database name> -locks -transactions -applications -dynamic
 
 
 
 

8) To capture all pending locks

 
db2pd -wlocks -db <database name>
 
 
 
 

If you got any locks here then you can use the -apinfo option with db2pd to capture detailed runtime information about the lock owner and lock waiter

 
db2pd -apinfo 21 -db <database name>
 

9) To get db2 database configuration information

 
db2pd -db <database name> -dbcfg
 
 
 
 

10) To get db2 hadr information

 
db2pd -db <database name> -hadr
 
 
 
 

11) To get tablespace containers statistics – total useable pages, used pages, free pages,tablespaces type

 
db2pd -tablespaces -db <database name>
 
 
 
 

12) To determine which application runs out of table space

 
db2pd -tcbstats -db <database name>
 
 
 
 

13) To view memory statistics of database partitions

 
db2pd -dbptnmem
 
 
 
 

14) To monitor memory usage.

 
db2pd -memblock
 
 
 
 

15) To verify whether recovery is in progress

 
db2pd -db <database name> -recovery
 
 
 
 

16) To determine the amount of resources that the transaction is using

 
db2pd -db <database name> -transactions
 
 
 
 

17) To monitor log usage

 
db2pd -db <database name> -logs
 
 
 
 

18) To view database bufferpool information.

 
db2pd -db <database name> -bufferpools
 
 
 
 

19) To get database application information.

 
db2pd -db <database name> -applications
 
 
 
 

20) To view dumps page cleaner related information from a database

 
db2pd -db <database name> -cleaner
 
 
 
 

21) To view the settings of the database configuration parameters.

 
db2pd -db <database name> -dbcfg
 
 
 
 

22) To view the settings of the database manager configuration parameters.

 
db2pd -dbmcfg
 
 
 
 

23) To get the fully resolved split diagnostic path.

 
db2pd -diagpath
 
 
 
 

24) To lists all EDUs in the instance.

 
db2pd -edus
 
 
 
 

25) To view the information about table and data partition reorganization of the connected database.

 
db2pd -db <database name> -reorg
 
 
 
 

26) To view the information about the status of the RUNSTATS utility on table and associated indexes of the connected database.

 
db2pd -db <database name> -runstats
 
 
 
 
 
 

That's all in this post. If you liked this blog and interested in knowing more about IBM Db2. Please Like, Follow, Share & Subscribe to www.ImJhaChandan.com.