SYSTEM_ACTIVITY_INFO table function
The SYSTEM_ACTIVITY_INFO table function returns a single row containing statistical information about CPU usage.
The information returned is similar to the detail provided by the Work with System Activity (WRKSYSACT) CL command.
Authorization: The caller must have *JOBCTL special authority.
The schema is QSYS2.
- delay-seconds
- An integer value that specifies an interval of time to wait between statistical readings. Detail
gathered from two points in time is used to calculate the table function results.
- integer
- A delay of integer seconds separates the collection of details. integer must be a value of 1 or greater. One second is the default.
The result of the function is a table containing a single row with the format shown in the following table. All the columns are nullable.
Column Name | Data Type | Description |
---|---|---|
AVERAGE_CPU_RATE | DECIMAL(20,2) | The average CPU rate expressed as a percentage where 100% indicates the processor is running at its nominal frequency. A value above or below 100% indicates how much the processor has been slowed down (throttled) or speeded up (turbo) relative to the nominal frequency for the processor model. For instance, a value of 120% indicates the processor is running 20% faster against its nominal speed. |
AVERAGE_CPU_UTILIZATION | DECIMAL(20,2) | The average CPU utilization for all the active processors. |
MINIMUM_CPU_UTILIZATION | DECIMAL(20,2) | The CPU utilization of the processor that reported the minimum amount of CPU utilization. |
MAXIMUM_CPU_UTILIZATION | DECIMAL(20,2) | The CPU utilization of the processor that reported the maximum amount of CPU utilization. |
Example
Return statistical CPU information. Use the default one second
interval.
SELECT * FROM TABLE(QSYS2.SYSTEM_ACTIVITY_INFO());