perfstat_cpu_total_wpar Subroutine

Purpose

Retrieves workload partition (WPAR) processor use statistics

Library

Perfstat Library (libperfstat.a)

Syntax

#include <libperfstat.h>

int perfstat_cpu_total_wpar ( name, userbuff, sizeof_userbuff, desired_number )
perfstat_id_wpar_t *name;
perfstat_cpu_total_wpar_t *userbuff;
size_t sizeof_userbuff;
int desired_number;

Description

The perfstat_cpu_total_wpar subroutine returns workload partition (WPAR) processor use statistics in a perfstat_cpu_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.

Parameters

Item Description
name Specifies the WPAR ID or 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_cpu_total_wpar_t structure.
sizeof_userbuff Specifies the size of the perfstat_cpu_total_wpar_t structure.
desired_number Specifies the number of structures to return. The value of this parameter must be set to the value of one.

Return Values

Upon successful completion, the number of structures filled is returned. If unsuccessful, a value of -1 is returned, and the errno global variable is set.

Error Codes

The perfstat_cpu_total_wpar subroutine is unsuccessful if one of the following is true:

Item Description
EINVAL One of the parameters is not valid.
EFAULT The memory is not sufficient.
ENOMEM The default length of the string is too short.

Files

The libperfstat.h file defines standard macros, data types, and subroutines.