In article <QIAkd.1410$%L1 .903@lakeread07 >,
Jag <ja***********@ hotmail.com> wrote:
hi all,
how can i monitor cpu utilization per database or per instance.
i run snapshot for database and get lots of information which probably can
be used to come up with some
equation. is there anything simpler?
any build in feature ?
I have been trying to do the same using the snapshot API and the best I
can do is to sum up all the CPU used by applications (so get an
applications snapshot). Alternatively, you can use a connections event
monitor and sum up all the CPU usage from the "connection end" events.
I have found two significant issues with DB2 in this area:
- In DB2 V7.x and V8.2 on Solaris 7 and Solaris 8, the system CPU time
used by agents is often misreported by significant amounts (off by
2^30 or 2^31). This is fixed in Solaris 9 (and there are also some
Sun patches for Solaris 8, don't have the details).
- In DB2 V8.2 on Linux/ia64 (Itanium), something similar happens - CPU
time reported for agents is sometimes off by large amounts, e.g. DB2
reports 15,000 CPU seconds used in 0.0001 elapsed seconds - and this
five minutes after starting the instance on a 4-CPU box.
Given this, you may be better off monitoring CPU usage using systemwide
tools, e.g. by looking at the load average or tools llike 'top'. On
servers dedicated to DB2, that will give you equivalent results of
possibly better quality.