Retrieves workload partition (WPAR) memory use statistics
Perfstat Library (libperfstat.a)
#include <libperfstat.h>
int perfstat_memory_total_wpar ( name, userbuff, sizeof_userbuff, desired_number )
perfstat_id_wpar_t *name;perfstat_memory_total_wpar_t *userbuff;
size_t sizeof_userbuff;
int desired_number;
The perfstat_memory_total_wpar subroutine returns workload partition (WPAR) memory use statistics in the perfstat_memory_total_wpar_t structure.
To get statistics of any particular WPAR from global environment, the WPAR ID or the WPAR name must be specified in the name parameter. The userbuff parameter must be allocated and the desired_number parameter must be set to the value of one. 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_memory_total_wpar_t structure. |
sizeof_userbuff | Specifies the size of the perfstat_memory_total_wpar_t structure. |
desired_number | Specifies the number of structures to return. |
Upon successful completion, the number of structures filled is returned. The returned value is one.
If unsuccessful, a value of -1 is returned, and the errno global variable is set.
The perfstat_memory_total_wpar subroutine is unsuccessful if the following is true:
Item | Description |
---|---|
EINVAL | One of the parameters is not valid. |
The libperfstat.h file defines standard macros, data types, and subroutines.