Tuesday, February 21, 2012

Try MONREPORT to generate monitoring reports

DB2 includes several system-defined modules that can come in handy. One that I would like to point you to is MONREPORT. As the name may hint at it can be used to generate monitoring reports, i.e., to retrieve monitoring data and generate text reports out of the data. Basically, some useful reports with lots of health indicators and statistics are just a call away.

Did you try "call monreport.dbsummary()" yet? Most (all?) the statistics that you need in a single report without any sweat. The module also has procedures to retrieve information about current SQL activities, package cache statistics, lock waits, etc. What is interesting to note is that the monreport procedures utilize the new monitoring infrastructure introduced in DB2 9.7, the MON_GET functions. And if you search the DB2 system catalog, you can even find the sources to the procedures in the MONREPORT modules. Something to take a look at, learn from, and be inspired...

1 comment:

  1. One of the things I like about the MONREPORT module is the ability to specify a timing interval. the MON_GET functions don't allow a reset of monitor switches, but with MONREPORT, you can at least define the interval (in seconds) over which data is collected. The default is 10 seconds. When I can find the time, I want to look up the code and play with my own copy.

    ReplyDelete

Your thoughts and feedback are highly appreciated. Please note that comments are moderated and they will not appear immediately.

LinkWithin

Related Posts with Thumbnails