Retrieves individual paging space usage statistics.
Perfstat Library (libperfstat.a)
#include <libperfstat.h>
int perfstat_pagingspace (name, userbuff, sizeof_struct, desired_number)
perfstat_id_t *name;
perfstat_pagingspace_t *userbuff;
size_t sizeof_struct;
int desired_number;
This function retrieves one or more individual pagingspace usage statistics. The same functions can also be used to retrieve the number of available sets of paging space statistics.
To get one or more sets of paging space usage metrics, set the name parameter to the name of the first paging space for which statistics are desired, and set the desired_number parameter. To start from the first paging space, set the name parameter to "" or FIRST_PAGINGSPACE. In either case, userbuff must point to a memory area big enough to contain the desired number of perfstat_pagingspace_t structures which will be copied by this function. Upon return, the name parameter will be set to either the name of the next paging space, or to "" if all structures have been copied.
To retrieve the number of available sets of paging space usage metrics, set the name and userbuff parameters to NULL, and the desired_number parameter to 0. The number of available sets will be returned.
The perfstat_pagingspace subroutine retrieves information from the ODM database. This information is automatically cached into a dictionary which is assumed to be frozen once loaded. The perfstat_reset subroutine must be called to flush the dictionary whenever the machine configuration has changed.
This subroutine is not supported inside a workload partition (WPAR). It is not aware of a WPAR.
Item | Description |
---|---|
name | Contains either "", FIRST_PAGINGSPACE, or a
name identifying the first paging space for which statistics are desired.
For example:
|
userbuff | Points to the memory area to be filled with one or more perfstat_pagingspace_t structures. |
sizeof_struct | Specifies the size of the perfstat_pagingspace_t structure: sizeof(perfstat_pagingspace_t) |
desired_number | Specifies the number of perfstat_pagingspace_t structures to copy to userbuff. |
Unless the perfstat_pagingspacesubroutine is used to retrieve the number of available structures, the number of structures which could be filled is returned upon successful completion. If unsuccessful, a value of -1 is returned and the errno global variable is set.
Item | Description |
---|---|
EINVAL | One of the parameters is not valid. |
The libperfstat.h file defines standard macros, data types, and subroutines.