pm_get_wplist Subroutine

Purpose

Retrieves the list of available workload partition contexts for Performance Monitoring.

Library

Performance Monitor APIs Library (libpmapi.a)

Syntax

#include <pmapi.h>int pm_get_wplist (*name, *wp_list, *size)
const char *name; 
pm_wpar_ctx_info_t *wp_list; 
int *size;

Description

The pm_get_wplist subroutine retrieves information on the workload partitions (WPAR) that are active during the last system-wide counting. This information includes the CID, name, and opaque handle of the WPAR. With the pm_get_data_wp or pm_get_data_wp_mx subroutines, the handle can retrieve system-wide Performance Monitor data for a specified WPAR.

If the name parameter is specified, the pm_get_wplist subroutine retrieves information for only the specified WPAR. Otherwise, the pm_get_wplist subroutine retrieves information for all WPAR that are active during the last system-wide counting.

If the wp_list parameter is not specified, the pm_get_wplist subroutine only returns the number of available WPAR contexts in that the size parameter points to. Otherwise, the array that the wp_list parameter points to is filled with up to the number of WPAR contexts that the size parameter defines.

The pm_get_wplist subroutine can allocate a wp_list array large enough to store all available WPAR contexts. To do this, calls the pm_get_wplist subroutine twice. The first call will retrieve the number of available WPAR contexts only.
Note: It is suggested to call the pm_get_wplist subroutine while no counting is active, because WPAR contexts can be created dynamically during an active counting.

On output to the pm_get_wplist subroutine, the variable that the size parameter points to is set to the number of available WPAR contexts for Performance Monitoring.

Parameters

Item Description
name The name of the WPAR for which information is to be retrieved. If the name is not specified, information for all WPAR that are active during the last system-wide counting is retrieved.
size Pointer to a variable that contains the number of elements of the array that the wp_list parameter points to. On output, this variable will be filled with the actual number of WPAR contexts available.
wp_list Pointer to an array that will be filled with WPAR contexts. If the wp_list parameter is not specified, only the number of WPAR contexts is to be retrieved.

Return Values

Item Description
0 Operation completed successfully.
Positive error code Run the pm_error subroutine (pm_error Subroutine) to decode the error code.

Error Codes

Run the pm_error subroutine to decode the error code.

Files

Item Description
/usr/include/pmapi.h Defines standard macros, data types, and subroutines.