MONITORRD packet

The MONITORRD packet is sent by the server at the end of a transaction. It contains information about the transaction.

This packet will almost always have a property ETIME (integer). It may also have other properties, depending on how the transaction was started. See the DRDA v5 protocol definition for details.

Example

You could easily add up the execution time for a connection with a JavaScript response filter for MONITORRD packets, and the code:

if ( ! context.connectionContext.executionTime) {

    context.connectionContext.executionTime = context.packet.ETIME;

}

else {

    context.connectionContext.executionTime += context.packet.ETIME;

}

If you then wanted to show the total execution time when the connection is closed, you could do so in a Connection close filter with the code:

log.info("Connection is closing for: " + context.connectionContext.userName +

    ", execution time: " + context.connectionContext.executionTime);