Chapter 17. System Monitoring For The Ibm Data Server Driver For Jdbc And Sqlj - IBM DB2 Manual

Table of Contents

Advertisement

Chapter 17. System monitoring for the IBM Data Server Driver
for JDBC and SQLJ
To assist you in monitoring the performance of your applications with the IBM
Data Server Driver for JDBC and SQLJ, the driver provides two methods to collect
information for a connection.
That information is:
Core driver time
Network I/O time
Server time
Application time
The two methods are:
v The DB2SystemMonitor interface
v The TRACE_SYSTEM_MONITOR trace level
To collect system monitoring data using the DB2SystemMonitor interface: Perform these
basic steps:
1. Invoke the DB2Connection.getDB2SystemMonitor method to create a
2. Invoke the DB2SystemMonitor.enable method to enable the DB2SystemMonitor
3. Invoke the DB2SystemMonitor.start method to start system monitoring.
4. When the activity that is to be monitored is complete, invoke
5. Invoke the DB2SystemMonitor.getCoreDriverTimeMicros,
For example, the following code demonstrates how to collect each type of elapsed
time data. The numbers to the right of selected statements correspond to the
previously described steps.
© Copyright IBM Corp. 1998, 2008
The sum of elapsed monitored API times that were collected while system
monitoring was enabled, in microseconds. In general, only APIs that might
result in network I/O or database server interaction are monitored.
The sum of elapsed network I/O times that were collected while system
monitoring was enabled, in microseconds.
The sum of all reported database server elapsed times that were collected
while system monitoring was enabled, in microseconds.
Currently, IBM Informix Dynamic Server databases do not support this
function.
The sum of the application, JDBC driver, network I/O, and database server
elapsed times, in milliseconds.
DB2SystemMonitor object.
object for the connection.
DB2SystemMonitor.stop to stop system monitoring.
DB2SystemMonitor.getNetworkIOTimeMicros,
DB2SystemMonitor.getServerTimeMicros, or
DB2SystemMonitor.getApplicationTimeMillis methods to retrieve the elapsed
time data.
493

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents