perfstat_partition_total Subroutine

Purpose

Retrieves global Micro-Partitioning® usage statistics.

Library

perfstat library (libperfstat.a)

Syntax

#include <libperfstat.h>
       int perfstat_partition_total(name, userbuff, sizeof_struct, desired_number)
       perfstat_id_t *name; 
       perfstat_partition_total_t *userbuff; 
       size_t sizeof_struct; 
       int desired_number;
       u_longlong_t reserved_pages;
       u_longlong_t reserved_pagesize.

Description

The perfstat_partition_total subroutine returns global Micro-Partitioning usage statistics in a perfstat_partition_total_t structure. To retrieve statistics that are global to the whole system, the name parameter must be set to NULL, the userbuff parameter must be allocated, and the desired_number parameter must be set to 1.

This subroutine returns partition wide metrics inside a workload partition (WPAR).

Parameters

Item Description
name Must be set to NULL.
userbuff Points to the memory area to be filled with the perfstat_partition_total_t structures.
sizeof_struct Specifies the size of the perfstat_partition_total_t structure: sizeof(perfstat_partition_total_t).
desired_number Must be set to 1.
reserved_pagesize Specifies the size of the pages for reserved memory. Not for use with DR operations.
reserved_pages Specifies the number of pages of type reserved_pagesize. This information can be retrieved by calling vmgetinfo. Not for use with DR operations.

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

Item Description
EINVAL One of the parameters is not valid.
EFAULT Insufficient memory.

Files

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