IBM Version 52 Computer Accessories User Manual


 
The most common uses for event monitors are for connections, locks, and
statements. Output can be written to files, named pipes (useful if writing programs
to retrieve monitor data), or to tables.
Event monitor output can be either blocked or nonblocked. Blocked output ensures
against data loss, but should generally be avoided for systems that produce a large
volume of records and for statement event monitors to avoid crashes.
You can limit the granularity of an event monitor to a single user or application.
Connection events can be used to track system usage on a user basis or application
basis. This data allows you to identify poorly performing programs, the heaviest
users, and usage trends. Daily review facilitates discussions with users about the
activity or about adjusting the DB2 physical design.
Use an Event Monitor to Diagnose and Flush Deadlocks
Sterling B2B Integrator, along with the necessary DB2 registry variables, is
designed to minimize the occurrence of deadlocks. However, deadlocks may still
occur in some situations, including the following:
v Custom BP code may obtain records in a different order.
v DB2 may choose an access plan that retrieves records in a different order.
The following table describes the actions to be performed for specific tasks:
Task What to Do
Set an event monitor
to help diagnose
deadlocks
Run this command:
db2 -v create event monitor $MON for deadlocks with details
write to file $OUTDIR buffersize 64 nonblocked
db2 -v set event monitor $MON state = 1
Options:
MON – Monitor name (for example, DLMON)
OUTDIR – directory to store deadlock information
Determine that a
deadlock has occurred
View data in the db2diag.log or in the Sterling B2B Integrator logs
Release a deadlock by
flushing buffers
Run the following command:
db2 flush event monitor $MON
db2evmon -path $OUTDIR
The flush ensures that the deadlock records in the buffers are
written out. The db2evmon command formats the deadlock
information.
Optim
Performance Manager Extended Edition
Optim Performance Manager is a performance analysis and tuning tool for
managing a mix of DB2 systems. It can be used to identify, diagnose, solve, and
prevent performance problems.
50 Sterling B2B Integrator: Performance Management