Hi. I'm writing to see if anyone has worked out a way to monitor the duration of DB2 deadlocks. I will test the check_db2_health script on the exchange, but it monitors for deadlocks per second, rather than the duration.
Thanks!
Monitoring duration of DB2 deadlocks
Re: Monitoring duration of DB2 deadlocks
Putting a monitor on the duration of deadlocks sounds like a great idea. The check_db2_health plugin in the Exchange has a flag for lock-waiting, but lock waits seem like they may be somewhat different from deadlocks...?
I did stumble across this post on Stack Overflow.
https://stackoverflow.com/questions/490 ... ock-in-db2
Specifically, this message.
I did stumble across this post on Stack Overflow.
https://stackoverflow.com/questions/490 ... ock-in-db2
Specifically, this message.
So it looks like there may be ways to monitor the deadlock event. Maybe they either include duration information, or a way to determine the duration. At which point, you could create a plugin.Yes that means no deadlock. If there was a deadlock and the event monitor was active at the time, then you should see a "Deadlock Event" stanza in the db2evmon output. You can also use the monitoring functions to confirm if a deadlock happened (but not how it happened). The following query reports cumulative values since database-activation:Code: Select all
SELECT deadlocks, lock_timeouts FROM TABLE (MON_GET_DATABASE(-2));
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitoring duration of DB2 deadlocks
Thank you very much! I'll try the method mentioned in the article.
Re: Monitoring duration of DB2 deadlocks
Cool! Do you want to leave this thread open, or should we close it?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitoring duration of DB2 deadlocks
We can close it. Thanks
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitoring duration of DB2 deadlocks
Great!awilson wrote:We can close it. Thanks
Locking