Retrieves the processor use statistics of resource set (rset)
Perfstat Library (libperfstat.a)
#include <libperfstat.h>
int perfstat_cpu_rset (name, userbuff, sizeof_userbuff, desired_number)
perfstat_id_wpar_t * name;
perfstat_cpu_t * userbuff;
size_t sizeof_userbuff;
int desired_number;
The perfstat_cpu_rset subroutine returns the use statistics of the processors that belong to the specified resource set (rset).
To get the statistics of the processors that are in the resource set, specify the name or ID of the WPAR, or the rset handle for the WPAR name. If the name or ID of the WPAR is specified, the associated rset is taken. The userbuff parameter must be allocated, and the desired_number parameter must be the number of processors in the rset. When this subroutine is called inside a WPAR, the name parameter must be specified as NULL.
Item | Description |
---|---|
name | Defines the WPAR name or WPAR ID. If the subroutine is called from WPARs, the value of the name parameter is null. |
userbuff | Points to the memory area that is to be filled with the perfstat_wpar_total_t structure. |
sizeof_userbuff | Specifies the size of the perfstat_wpar_total_t structure. |
desired_number | Specifies the number of perfstat_wpar_total_t structures to copy to userbuff. The value of this parameter must be set to one. |
Upon successful completion, the number of structures filled is returned.
If unsuccessful, a value of -1 is returned and the errno global variable is set.
The perfstat_cpu_rset subroutine is unsuccessful if one of the following is true:
Item | Description |
---|---|
EINVAL | One of the parameters is not valid |
EFAULT | The memory is not sufficient |
The libperfstat.h file defines standard macros, data types, and subroutines.