System Monitor Guide and Reference


Monitor Output Format

Version 7 introduces a new output format for snapshot and event monitors. Rather than returning a list of data structures, the system monitor now returns a self-describing output data stream. The move to this new format coincides with DB2 Universal Database's added flexibility when it comes to naming SQL objects. For example, in Version 7 table names grew from a maximum of 18 bytes, to a maximum of 128 bytes. The static sized output structures used in previous releases could not contain this change in size.

This self-describing data stream allows you to parse through the returned data. It also means that any changes to existing data elements, or the addition of new data elements will not require changes to existing applications.

The returned monitor data is in the following format:

size
The size (in bytes) of the data stored in the data element or logical data grouping. In the case of a logical data grouping, this is the size of all data in the logical group (for example, the database logical grouping (db) contains individual data elements (for example, total_log_used) along with other logical data groupings, such as rollforward information (rollforward).
type
The type of element stored in the data (for example, variable length string or signed 32 bit numeric value). An element type of header refers to a logical data grouping for an element (see Output Records and Snapshot Requests.)
element
The name of the data element that was captured by the monitor. In the case of a logical data grouping, this is the name of the group (for example, collected, dbase, or db_event).
data
The value collected by a monitor for a data element. In the case of a logical data grouping, there is no data section. Strings returned by DB2 are NOT NULL TERMINATED.

Chapter 4, Event Monitor Output and Chapter 5, Snapshot Monitor Output provide examples of the event monitor and snapshot data streams.

When a Version 7 snapshot request is made, but a lower version of snapshot data is returned from the server (for example, from a down-level server), SQLCODE +1627W is returned to the caller, and the monitor output is in the pre-Version 7 format and must be parsed using the Version 5 method (see Table 3).

The db2ConvMonStream API can be used to convert the new monitor format for a logical data grouping to the corresponding pre-Version 7 data structure. db2ConvMonStream describes this API and maps pre-Version 7 structures to the new Version 7 format. For more information on the data returned by Version 7 snapshot monitors see Chapter 5, Snapshot Monitor Output.

Event monitors write their data in the new monitor format by default. This can be overridden for individual event monitors by setting the registry variable DB2OLDEVMON=evmon1,evmon2,..., where evmon1 is an event monitor that will write its data in the old format. For more information on the data returned by Version 7 event monitors see Chapter 4, Event Monitor Output.


[ Top of Page | Previous Page | Next Page ]