Monitor procedures and functions
Monitor routines are procedures
or functions with names that begin with MON
, such as MON_GET_SERVICE_SUBCLASS,
or EVMON
, such as EVMON_FORMAT_UE_TO_TABLES.
Characteristics of monitor (MON) table functions
These
routines perform a variety of different functions related to querying
the status of your system, or manipulating monitoring data. Some routines
are table functions that return data in the form of a table. For example,
numerous table functions provide access to monitor elements. Some
monitor routines, notably, the ones that begin with EVMON
transform
data in one format to another. Certain other routines, such as environment
or administration routines, also return information that is relevant
when monitoring.
The "MON" routines are strategically important, therefore the names of these routines will not change in future releases. However, they will have new output columns added when enhancements are made in future releases. Therefore, when you issue a query to retrieve information using a built-in routine, do not use a statement of the form SELECT * .... Instead, name the result columns in the SELECT statement. This gives the application control over the number of result columns and the sequence in which they are returned.
- Some table functions have two versions, one of which has a _DETAILS suffix. The version without the _DETAILS suffix provides a relational SQL interface that returns the most commonly used data. The version with the _DETAILS suffix provides XML-based access to the monitor data.
- The metrics returned by the monitoring table functions are never reset. They start at 0 when the database is activated and continue to accumulate until the database is deactivated.
- With most table functions, you can choose to receive data for a single object (for example, service class "A") or for all objects.
- As with most table functions, when using these table functions in a Db2® pureScale® environment or a partitioned database environment, you can choose to receive data for a single member or for all members. If you choose to receive data for all members, the table functions return one row for each member. You can add the values across members to obtain the value of a monitor element across members.
Monitor (MON) table functions
Monitor table functions return a diverse set of monitor elements describing system behavior and performance that can be used for understanding, tuning, and troubleshooting applications on the database server. These elements provide information about a diverse set of system performance indicators that can affect application response time. You can also obtain monitor data for a subset of the workload you are interested in.
- MON_GET_CONNECTION and MON_GET_CONNECTION_DETAILS
- MON_GET_SERVICE_SUBCLASS and MON_GET_SERVICE_SUBCLASS_DETAILS
- MON_GET_UNIT_OF_WORK and MON_GET_UNIT_OF_WORK_DETAILS
- MON_GET_WORKLOAD and MON_GET_WORKLOAD_DETAILS
- MON_GET_DATABASE and MON_GET_DATABASE_DETAILS
- MON_GET_APPL_LOCKWAIT
- MON_GET_BUFFERPOOL
- MON_GET_CONTAINER
- MON_GET_EXTENDED_LATCH_WAIT
- MON_GET_INDEX
- MON_GET_LOCKS
- MON_GET_PAGE_ACCESS_INFO
- MON_GET_TABLE
- MON_GET_TABLESPACE
- MON_GET_FCM
- MON_GET_FCM_CONNECTION_LIST
- MON_GET_HADR
- MON_GET_SERVERLIST
- MON_GET_TRANSACTION_LOG
- MON_GET_ROUTINE
- MON_GET_AGENT
- MON_GET_ACTIVITY returns details for a specific activity currently running on the system; these details include general activity information (like statement text) and a set of metrics.
- MON_GET_INDEX_USAGE_LIST returns information from a usage list defined for an index.
- MON_GET_TABLE_USAGE_LIST returns information from a usage list defined for a table.
- MON_GET_PKG_CACHE_STMT and MON_GET_PKG_CACHE_STMT_DETAILS
- MON_GET_WLM_ADMISSION_QUEUE returns a list of all activities in the admission queue and their position in the queue.
- MON_GET_AUTO_MAINT_QUEUE returns information about all automatic maintenance jobs that are currently queued for execution by the autonomic computing daemon (db2acd).
- MON_GET_AUTO_RUNSTATS_QUEUE returns information about all objects which are currently queued for evaluation by automatic statistics collection in the currently connected database.
- MON_GET_EXTENT_MOVEMENT_STATUS returns the status of the extent movement operation.
- MON_GET_REBALANCE_STATUS returns the status of a rebalance operation on a table space.
- MON_GET_RTS_RQST returns information about all real-time statistics requests that are pending in the system, and the set of requests that are currently being processed by the real time statistics daemon.
- MON_GET_USAGE_LIST_STATUS returns current status on a usage list.
- MON_FORMAT_XML_COMPONENT_TIMES_BY_ROW returns formatted row-based output on component times.
- MON_FORMAT_XML_METRICS_BY_ROW returns formatted row-based output for all metrics.
- MON_FORMAT_XML_TIMES_BY_ROW returns formatted row-based output on the combined hierarchy of wait and processing times.
- MON_FORMAT_XML_WAIT_TIMES_BY_ROW table function returns formatted row-based output on wait times.
Event monitor (EVMON) routines
The event monitor routines allow you to access event monitor data, either through an XML document, by using the EVMON_FORMAT_UE_TO_XML table function; or through relational tables, by using the EVMON_FORMAT_UE_TO_TABLES procedure.