IBM Support

How to setup the db2evmonfmt tool

Technote (FAQ)


How can you use db2evmonfmt tool to monitor database information?


The db2evmonfmt tool is a java based tool that requires java to work correctly. This tool must be setup to view unformatted event table data.


First you must have an event monitor that uses an unformatted event table. This example illustrates how to setup the event monitor for UOW. But this tool can be used for any event monitor that utilizes an unformatted event table.


1. Create the event monitor.

db2 "create event monitor my_uow_evmon for unit of work write to unformatted event table (in userspace1)"

2. Update the monitor switches.

db2 udpate dbm cfg for DFT_MON_UOW using on

3. Then update the db cfg setting mon_uow_data

db2 update db cfg for dbname using mon_uow_data base

4. Run some queries. To add data to the event monitor table.

5. Setup the db2evmonfmt tool.

Now after an install the java classes and pathes should be setup. So this may be done in your env as well. Check by doing this.

echo $PATH
java -version
which java

This will show you the paths setup for this. And if you have to alter them. They should look something like this.


echo $PATH


java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.9) (rhel-
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

which java

If any of these are not setup like this you will have to export them to your env manually.
Like this:

export LD_LIBRARY_PATH=/home/db2v97/sqllib/lib64:/home/db2v97/sqllib/lib32

6. After you verify these paths are correct. Then you need to move the app and compile it. You will need to move these files to the location you will wish to run this at.


cp /home/db2v97

cp DB2EvmonUOW.xsl /home/db2v97 <-----------------------------You need to copy all the xsl that you plan to use. For this I only did UOW.

7. A java compiler maybe needed, one option would be to use the open java development kit. To install it you must be root and run something similar to:

yum install java-1.6.0-openjdk-devel

Once this is done then you should be able to compile it.

8. After the compiler is installed run the following command to complete the process:


As the instance id used to create the event.

9. To view the output you can run something like:

java db2evmonfmt -d sample -ue MY_UOW_EVMON -ftext

Related information

db2evmonfmt Tool Syntax
Part 3: Use the lock event monitor in DB2 9.7 to solve

Document information

More support for: DB2 for Linux, UNIX and Windows
Performance - Monitoring Tools

Software version: 9.7, 9.8, 10.1, 10.5

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Software edition: Advanced Enterprise Server, Enterprise Server, Workgroup Server

Reference #: 1640515

Modified date: 01 July 2013

Translate this page: