pm_get_data_wp, pm_get_tdata_wp, pm_get_Tdata_wp, pm_get_data_lcpu_wp, pm_get_tdata_lcpu_wp, and pm_get_Tdata_lcpu_wp Subroutines

Purpose

Returns Performance Monitor data for a specified workload partition.

Library

Performance Monitor APIs Library (libpmapi.a)

Syntax

#include <pmapi.h>

int pm_get_data_wp (wp_handle, *pmdata)
pm_wp_handle_t wp_handle;
pm_data_t *pmdata;

int pm_get_tdata_wp (wp_handle, *pmdata, *time)
pm_wp_handle_t wp_handle;
pm_data_t *pmdata;
timebasestruct_t *time;

int pm_get_Tdata_wp (wp_handle, pmdata, * times)
pm_wp_handle_t wp_handle;
pm_data_t *pmdata;
pm_accu_time_t *times;

int pm_get_data_lcpu_wp (wp_handle, lcpuid, *pmdata)
pm_wp_handle_t wp_handle;
int lcpuid;
pm_data_t *pmdata;

int pm_get_tdata_lcpu_wp (wp_handle, lcpuid, *pmdata, *time)
pm_wp_handle_t wp_handle;
int lcpuid;
pm_data_t *pmdata;
timebasestruct_t *time;

int pm_get_Tdata_lcpu_wp (wp_handle, lcpuid, *pmdata, *times)
pm_wp_handle_t wp_handle;
int lcpuid;
pm_data_t *pmdata;
pm_accu_time_t *times

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. The pm_get_wplist subroutine (pm_get_wplist Subroutine) retrieves this WPAR handle.

The following table shows the information that these subroutines retrieve.
Subroutines Information
pm_get_data_wp The current Performance Monitor data for the specified WPAR
pm_get_tdata_wp
  • The current Performance Monitor data for the specified WPAR
  • A timestamp indicating the last time that the hardware counters were read for the specified WPAR
pm_get_Tdata_wp
  • The current Performance Monitor data for the specified WPAR
  • The accumulated time (timebase, PURR time and SPURR time) that the events were counted for the specified WPAR
pm_get_data_lcpu_wp
  • The current Performance Monitor data for the specified WPAR and logical processor
pm_get_tdata_lcpu_wp
  • The current Performance Monitor data for the specified WPAR and logical processor
  • A timestamp indicating the last time that the hardware counters were read
pm_get_Tdata_lcpu_wp
  • The current Performance Monitor data for the specified WPAR and logical processor
  • The accumulated time (timebase, PURR time and SPURR time) that the events were counted

The pm_get_data_lcpu_wp, pm_get_tdata_lcpu_wp, and pm_get_Tdata_lcpu_wp subroutines retrieve the current Performance Monitor data for the specified WPAR and logical processor. The specified processor ID represents a value that ranges from 0 through the maximum number that the system defines ( with the _system_configuration.max_ncpus parameter). The processor ID always represents the same processor, even after Dynamic Reconfiguration operations. If the specified WPAR or logical processor number has never run during the counting interval, the pm_get_data_lcpu_wp, pm_get_tdata_lcpu_wp, and pm_get_Tdata_lcpu_wp subroutines might return an error.

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

Parameters

Item Description
lcpuid The logical processor identifier. Each identifier maintain a link to a particular processor between reboots, even after the Dynamic Reconfiguration. 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.
time The pointer to a structure that contains the timebase value the last time that the hardware Performance Monitoring counters were read. This parameter can be converted to time using the time_base_to_time subroutine.
times The pointer to a structure that contains the accumulated time (timebase, PURR time, and SPURR time) that the events were counted. Each time counter 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 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.