IBM Support

Weekly Tips from DB2 Experts: Determine Instance uptime using db2pd utility

Technical Blog Post


Abstract

Weekly Tips from DB2 Experts: Determine Instance uptime using db2pd utility

Body

db2pd is a very powerful tool which can be used for troubleshooting many complex issue in DB2 like - high memory usage, locking issues, HADR, and collecting various statistics. It can also be used to find out a simple thing like how long the instance has been up.

db2pd with a '-' option displays the uptime for an instance. It displays the number of days and hours the instance has been running. No database connection is required.
$ db2pd -

Database Member 0 -- Active -- Up 4 days 00:13:14 -- Date 2014-10-27-14.56.06.346538

If the instance is down, the following message will be displayed.
$ db2pd -
Unable to attach to database manager on member 0.
Please ensure the following are true:
   - db2start has been run for the member.
   - db2pd is being run on the same physical machine as the member.
   - DB2NODE environment variable setting is correct for the member
     or db2pd -mem setting is correct for the member.

Thanks for reading. Please feel free to post your comments/feedback.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm11141300