To monitor IBM® Data Server Driver for JDBC and SQLJ Sysplex
support, you need to monitor the global transport objects pool.
You can monitor the global transport objects pool in either of
the following ways:
- Using traces that you start by setting IBM Data Server Driver for JDBC and SQLJ configuration
properties
- Using an application programming interface
Configuration properties for monitoring the global
transport objects pool
The db2.jcc.dumpPool, db2.jcc.dumpPoolStatisticsOnSchedule,
and db2.jcc.dumpPoolStatisticsOnScheduleFile configuration properties
control tracing of the global transport objects pool.
Example: The
following set of configuration property settings cause error messages,
dump pool error messages, and transport pool statistics to be written
every 60 seconds to a file named /home/WAS/logs/srv1/poolstats:
db2.jcc.dumpPool=DUMP_SYSPLEX_MSG|DUMP_POOL_ERROR
db2.jcc.dumpPoolStatisticsOnSchedule=60
db2.jcc.dumpPoolStatisticsOnScheduleFile=/home/WAS/logs/srv1/poolstats
An entry in the pool
statistics file looks like this:
time Scheduled PoolStatistics npr:2575 nsr:2575 lwroc:439 hwroc:1764 coc:372
aooc:362 rmoc:362 nbr:2872 tbt:857520 tpo:10
group: DSNDB port: 446 hwmpo: 20 twte: 5 ngipr: 50 ttcpto: 2
member: port: 446 DB1A hwmiut: 6 hwmt: 2 tmct: 1 trto: 0
member: port: 446 DB1B hwmiut: 7 hwmt: 2 tmct: 1 trto: 0
member: port: 446 DB1C hwmiut: 6 hwmt: 1 tmct: 0 trto: 1
The meanings
of the fields are:
- npr
- The total number of requests that the IBM Data Server Driver for JDBC and SQLJ has
made to the pool since the pool was created.
- nsr
- The number of successful requests that the IBM Data Server Driver for JDBC and SQLJ has
made to the pool since the pool was created. A successful request
means that the pool returned an object.
- lwroc
- The number of objects that were reused but were not in the pool.
This can happen if a Connection object releases a transport object
at a transaction boundary. If the Connection object needs a transport
object later, and the original transport object has not been used
by any other Connection object, the Connection object can use that
transport object.
- hwroc
- The number of objects that were reused from the pool.
- coc
- The number of objects that the IBM Data Server Driver for JDBC and SQLJ created
since the pool was created.
- aooc
- The number of objects that exceeded the idle time that was specified
by db2.jcc.maxTransportObjectIdleTime and were deleted from the pool.
- rmoc
- The number of objects that have been deleted from the pool since
the pool was created.
- nbr
- The number of requests that the IBM Data Server Driver for JDBC and SQLJ made
to the pool that the pool blocked because the pool reached its maximum
capacity. A blocked request might be successful if an object is returned
to the pool before the db2.jcc.maxTransportObjectWaitTime is exceeded
and an exception is thrown.
- tbt
- The total time in milliseconds for requests that were blocked
by the pool. This time can be much larger than the elapsed execution
time of the application if the application uses multiple threads.
- sbt
- The shortest time in milliseconds that a thread waited to get
a transport object from the pool. If the time is under one millisecond,
the value in this field is zero.
- lbt
- The longest time in milliseconds that a thread waited to get a
transport object from the pool.
- abt
- The average amount of time in milliseconds that threads waited
to get a transport object from the pool. This value is tbt/nbr.
- tpo
- The number of objects that are currently in the pool.
- group
- The data sharing group for which transport pool statistics were
gathered.
- port
- The port number of the data sharing group or member.
- hwmpo
- The maximum number of pool objects that were created since the
pool was created.
- twte
- The number of times that the maxTransportWaitTime value was exceeded
since the pool was created.
- ngipr
- The number of times that the group IP address was used since the
pool was created.
- ttcpto
- The total number of times that members of the data sharing group
had a connection timeout when they were establishing a new connection.
- member
- The member of the data sharing group for which transport statistics
were gathered.
- hwmiut
- The maximum number of in-use transports for the data sharing member
since the pool was created.
- hwmt
- The maximum number of transports that have been allocated to the
data sharing member since the pool was created.
- tmct
- The number of times that the memberConnectTimeout value was reached
for the data sharing member since the pool was created.
- trto
- The number of times that a read timeout occurred for the data
sharing member since the pool was created.
Application programming interfaces for monitoring
the global transport objects pool
You can write applications
to gather statistics on the global transport objects pool. Those applications
create objects in the DB2PoolMonitor class and
invoke methods to retrieve information about the pool.
For
example, the following code creates an object for monitoring the global
transport objects pool:
import com.ibm.db2.jcc.DB2PoolMonitor;
DB2PoolMonitor transportObjectPoolMonitor =
DB2PoolMonitor.getPoolMonitor (DB2PoolMonitor.TRANSPORT_OBJECT);
After you create the DB2PoolMonitor object,
you can use methods in the DB2PoolMonitor class
to monitor the pool.