Question & Answer
Question
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.
Cause
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 offering of Db2 (including PureScale)
Instead of traditional snapshot monitoring, this tool uses the in-memory metrics interfaces available for obtaining various performance details about the database.
Answer
Version 11.1.4.4 and higher provide the most recent version of the script in the ~/sqllib/samples/perf directory in the instance home directory.
The script can be copied from there. The copy in the samples directory is the most appropriate version of the script to use.
In older releases, you can still use the versions attached to this web page.
These copies are provided here for convenience with the default 30 second runtime and were generated with version v1.2.0 of db2mon.pldb2mon_v97.tar
db2mon_v115.tar
A regular execution would be to 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
A regular execution would be to 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 command produces ".ixf" files that can be imported with the db2mon_import.sql file and a report can be generated using db2mon_report.sql.
[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"ARM Category":[{"code":"a8m500000008PkqAAE","label":"Performance"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"11.5.0"}]
Was this topic helpful?
Document Information
Modified date:
25 April 2022
UID
swg21993956