Question & Answer
The db2mon script is a created on top of the SQL monitoring interfaces provided by DB2 LUW It monitors database activity for a set amount of time ( default = 30 seconds ) and provides various metrics in a detailed report section as the output.
Performance troubleshooting is a challenging topic. This script is widely used within support to troubleshoot performance problems, it is generic in nature and works well with any flavour of DB2 ( including Purescale )
Instead of traditional snapshot monitoring, this uses the in-memory metrics interfaces available for obtaining various performance details about the database.
The usage is
Specify the DB2 version you would like to generate the script for.
Usage: ./db2mon.pl (9.7|10.1|10.5|11.1)(ORA)? [collect time in seconds; 0 means wait for <ENTER>]
This will generate scripts and sql files needed to run.
For your convenience, these have been provided here with the default 30 second runtime.
A regular execution would be to just run :
./db2mon.sh <db> >> report.out
to interpret the data, look for "REPORT STARTS HERE" in the output file.
If the data needs to be retained for further analysis in a table format, then use the db2 -tvf db2mon_export.sql script instead. This produces ixf files that can be imported using the db2mon_import.sql file and a report can be generated using db2mon_report.sql
16 June 2018