DB2 Version 9.7 for Linux, UNIX, and Windows

WLM_GET_WORK_ACTION_SET_STATS table function - Return work action set statistics

The WLM_GET_WORK_ACTION_SET_STATS function returns the statistics for a work action set.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-WLM_GET_WORK_ACTION_SET_STATS--(--work_action_set_name--,---->

>--dbpartitionnum--)-------------------------------------------><

The schema is SYSPROC.

Table function parameters

work_action_set_name
An input argument of type VARCHAR(128) that specifies the work action set to return statistics for. If the argument is null or an empty string, statistics are returned for all work action sets.
dbpartitionnum
An input argument of type INTEGER that specifies a valid partition number in the same instance as the currently connected database. Specify -1 for the current database partition, or -2 for all database partitions. If the null value is specified, -1 is set implicitly.

Authorization

EXECUTE privilege on the WLM_GET_WORK_ACTION_SET_STATS function.

Example

Assume that there are three work classes: ReadClass, WriteClass, and LoadClass. There is a work action associated with ReadClass and a work action associated with LoadClass, but there is no work action associated with WriteClass. On partition 0, the number of activities currently running or queued are as follows:
  • ReadClass class: eight
  • WriteClass class: four
  • LoadClass class: two
  • Unassigned: three
SELECT SUBSTR(WORK_ACTION_SET_NAME,1,18) AS WORK_ACTION_SET_NAME,
       SUBSTR(CHAR(DBPARTITIONNUM),1,4) AS PART,
       SUBSTR(WORK_CLASS_NAME,1,15) AS WORK_CLASS_NAME,
       LAST_RESET,
       SUBSTR(CHAR(ACT_TOTAL),1,14) AS ACT_TOTAL
  FROM TABLE(WLM_GET_WORK_ACTION_SET_STATS
       (CAST(NULL AS VARCHAR(128)), -2)) AS WASSTATS
  ORDER BY WORK_ACTION_SET_NAME, WORK_CLASS_NAME, PART
Sample output is as follows. Because there is no work action associated with the WriteClass work class, the four activities to which it applies are counted in the artificial class denoted by an asterisk (*) in the output. The three activities that were not assigned to any work class are also included in the artificial class.
WORK_ACTION_SET_NAME PART WORK_CLASS_NAME LAST_RESET                 ACT_TOTAL
-------------------- ---- --------------- -------------------------- --------------
AdminActionSet       0    ReadClass       2005-11-25-18.52.49.343000 8
AdminActionSet       1    ReadClass       2005-11-25-18.52.50.478000 0
AdminActionSet       0    LoadClass       2005-11-25-18.52.49.343000 2
AdminActionSet       1    LoadClass       2005-11-25-18.52.50.478000 0
AdminActionSet       0    *               2005-11-25-18.52.49.343000 7
AdminActionSet       1    *               2005-11-25-18.52.50.478000 0

Information returned

Table 1. Information returned for WLM_GET_WORK_ACTION_SET_STATS
Column name Data type Description
WORK_ACTION_SET_NAME VARCHAR(128) work_action_set_name - Work action set name monitor element
DBPARTITIONNUM SMALLINT Partition number from which this record was collected.
LAST_RESET TIMESTAMP last_reset - Last Reset Timestamp monitor element
WORK_CLASS_NAME VARCHAR(128) work_class_name - Work class name monitor element
ACT_TOTAL BIGINT act_total - Activities total monitor element