Statistics for DB2® workload management objects can be sent to a statistics event monitor for historical analysis.
You can use statistics to understand the behavior of your system over time (for example, what is the average lifetime of activities, how much time do activities spend queued, what is the distribution of large compared to small activities, and so on), set thresholds (for example, find the upper boundary for concurrent activities), and detect problems (for example, detect whether the average lifetime that users are experiencing is higher than normal). See Statistics for DB2 workload management objects for a description of which statistics are collected for each DB2 workload management object.
You can automatically send workload management statistics to an event monitor on a fixed interval of time, or you can manually send statistics to an event monitor at any point in time.
To automatically collect workload management statistics on a fixed time interval:
After you perform the preceding steps, workload management statistics are written to the statistics event monitor every wlm_collect_int minutes. Each record written to the statistics event monitor has a STATISTICS_TIMESTAMP value and a LAST_WLM_RESET value. The interval of time from LAST_WLM_RESET to STATISTICS_TIMESTAMP defines the collection interval (that is, interval of time over which the statistics in that record were collected).
Collections occur at the specified interval times as measured relative to Sunday at 00:00:00. When the catalog member becomes active, the next collection will occur at the start of the next scheduled interval relative to this fixed time. The scheduled interval is not relative to the catalog member activation time. If a member is not active at the time of collection, no statistics are gathered for that member. For example, if the interval value was set to 60 and the catalog member was activated on 9:24 AM on Sunday, then the collections would be scheduled to occur each hour on the hour. Therefore, the next collection will occur at 10:00 AM. If the member is not active at 10:00 AM, then no statistics will be gathered for that member
If the wlm_collect_int parameter is set to a nonzero value and there is no active statistics event monitor, the workload management statistics are still reset every wlm_collect_int minutes, but statistics are not collected. The data will be lost. For this reason, it is not recommended that you specify a nonzero wlm_collect_int value without activating a statistics event monitor.
If the wlm_collect_int parameter is set to 0 (the default) statistics are not sent to the statistics event monitor automatically. You can manually send statistics to the statistics event monitor for later historical analysis by using the WLM_COLLECT_STATS stored procedure. When this procedure is invoked, it performs the same actions that occur with an automatic statistics collection interval. That is, the statistics are sent to the statistics event monitor and the statistics are reset. If there is no active statistics event monitor, the values are reset, but data is not collected. If you only want to reset statistics, you can invoke the WLM_COLLECT_STATS procedure while there is no active statistics event monitor.
Manual collection of statistics does not interfere with the automatic collection of statistics. For example, assume that you have wlm_collect_int set to 60. Statistics are sent to the statistics event monitor every hour. Now assume that the last time the statistics were collected was 5:00 AM. You can invoke the WLM_COLLECT_STATS procedure at 5:55 AM, which sends the values of the statistics to the event monitor and resets the statistics. The next automatic statistics collection still occurs at 6:00 AM, one hour after the last automated collection. The collection interval is not affected by any manual collection and resetting of statistics that occurs during the interval.
Also, with the RESET MONITOR command, each process (attachment) has its own private view of the monitor data. If one user performs a reset, other users are unaffected. By contrast, a reset of the workload management statistics applies to all users.