Retrieves workload partition (WPAR) use statistics
Perfstat Library (libperfstat.a)
#include <libperfstat.h>
int perfstat_wpar_total ( name, userbuff, sizeof_userbuff, desired_number )
perfstat_id_wpar_t *name;
perfstat_wpar_total_t *userbuff;
size_t sizeof_userbuff;
int desired_number;
The perfstat_wpar_total subroutine returns the workload partition (WPAR) use statistics in the perfstat_wpar_total_t structure.
To get the total number of WPARs, the name parameter and the userbuff parameter must be specified as NULL, and the desired_number parameter must be specified as the value of zero.
To get the statistics of any particular WPAR, the WPAR ID or name must be specified in the name parameter. The userbuff parameter must be allocated. The desired_number parameter must be set. When this subroutine is called inside a WPAR, the name parameter must be set to NULL.
Item | Description |
---|---|
name | Specifies the WPAR ID or the WPAR name. It is NULL if the subroutine is called from WPAR. |
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 structures to return. 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_wpar_total 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.