perfstat_cpu_total_rset Subroutine

Purpose

Retrieves the processor use statistics of resource set (rset)

Library

Perfstat Library (libperfstat.a)

Syntax

#include <libperfstat.h>
int perfstat_cpu_total_rset (name, userbuff, sizeof_userbuff, desired_number)
perfstat_id_wpar_t * name;
perfstat_cpu_total_rset_t * userbuff;
size_t sizeof_userbuff;
int desired_number;

Description

The perfstat_cpu_total_rset subroutine returns the total use statistics of the processors that belong to the specified resource set (rset).

To get the statistics of the processor use by the rset, specify the WPAR ID. The userbuff parameter must be allocated, and the desired_number parameter must be set. When this subroutine is called inside a WPAR, the name parameter must be specified as NULL.

Parameters

Item Description
name Defines the WPAR name or the WPAR ID. If the subroutine is called from WPAR, the value of the name parameter is null.
userbuff Points to the memory area that is to be filled with the perfstat_cpu_total_rset_t structure.
sizeof_userbuff Specifies the size of the perfstat_cpu_total_rset_t structure.
desired_number Specifies the number of perfstat_cpu_total_rset_t structures to copy to userbuff. The value of this parameter must be set to 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_rset 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.