pm_get_data_wp_mx, pm_get_tdata_wp_mx, pm_get_data_lcpu_wp_mx, and pm_get_tdata_lcpu_wp_mx Subroutine

Purpose

Returns Performance Monitor data in counter multiplexing mode for a specified workload partition.

Library

Performance Monitor APIs Library (libpmapi.a)

Syntax

#include <pmapi.h>

int pm_get_data_wp_mx (wp_handle, *pmdata) pm_wp_handle_t wp_handle; 
pm_data_mx_t *pmdata;

int pm_get_tdata_wp_mx (wp_handle, pmdata, *time) pm_wp_handle_t wp_handle; 
pm_data_mx_t *pmdata; 
timebasestruct_t *time;

int pm_get_data_lcpu_wp_mx (wp_handle, lcpuid, *pmdata) pm_wp_handle_t 
wp_handle;
int lcpuid;
pm_data_mx_t *pmdata;

int pm_get_tdata_lcpu_wp_mx (wp_handle, lcpuid, *pmdata, *time) pm_wp_handle_t 
wp_handle;
int lcpuid;
pm_data_mx_t *pmdata;
timebasestruct_t *time;

Description

These subroutines return data for only the activities of the processes that belong to a specified workload partition (WPAR).

The specified WPAR handle represents an opaque number that uniquely identifies a WPAR. This WPAR handle can be retrieved using the pm_get_wplist subroutine (pm_get_wplist Subroutine).

The following table shows the information that these subroutines retrieve.
Subroutines Information
pm_get_data_wp_mx The current Performance Monitor data in counter multiplexing mode for the specified WPAR
pm_get_tdata_wp_mx
  • The current Performance Monitor data in counter multiplexing mode
  • A timestamp indicating the last time that the hardware counters were read for the specified WPAR
pm_get_data_lcpu_wp_mx
  • The current Performance Monitor data in counter multiplexing mode for the specified WPAR and logical processor
pm_get_tdata_lcpu_wp_mx
  • The current Performance Monitor data in counter multiplexing mode for the specified WPAR and logical processor
  • A timestamp indicating the last time that the hardware counters were read for the specified WPAR

The pm_get_data_lcpu_wp_mx and the pm_get_tdata_lcpu_wp_mx subroutines retrieve the current Performance Monitor data for a specified WPAR and logical processor. The specified processor ID represents a value that ranges from 0 to the value of the _system_configuration.max_ncpus parameter. This value always represents the same processor, even after Dynamic Reconfiguration operations. These subroutines might return an error if the specified WPAR or logical processor number has never run during the counting interval.

The Performance Monitor data is always an array of a set of 64-bit values, one per hardware counter on the machines that are used.

The user application must free the array that is allocated to store the accumulated counts and times (the accu_set field of the pmdata parameter).

Parameters

Item Description
lcpuid The logical processor identifier. Each identifier maintains a link to a particular processor between reboots, even after Dynamic Reconfiguration operations. This value must be in the range from 0 through the value of the _system_configuartion.max_ncpus parameter.
pmdata The pointer to a structure that contains the returned Performance Monitor data. The data can be the array of accumulated counters, accumulated time and accumulated PURR and SPURR time for each event set counted.
time The pointer to a structure containing the timebase value that the last time the hardware Performance Monitoring counters were read. This can be converted to time using the time_base_to_time subroutine.
wp_handle The opaque handle that uniquely identifies a WPAR. This handle can be retrieved from the WPAR name using the pm_get_wplist subroutine.

Return Values

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

Errors

Run the pm_error subroutine to decode the error code.

Files

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