perfstat_partition_config Subroutine

Purpose

Retrieves operating system and partition related information.

Library

perfstat library (libperfstat.a)

Syntax

#include <libperfstat.h>
int perfstat_partition_config (name, userbuff, sizeof_userbuff, desired_number)
perfstat_id_t * name;
perfstat_partition_config_t * userbuff;
int  sizeof_userbuff ;
int  desired_number ;

Description

The perfstat_partition_config subroutine returns the operating- system and partition-related information in a perfstat_partition_config_t structure. To retrieve statistics for 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. If the name and userbuff parameters are set to NULL, and the sizeof_userbuff is set to 0, then the size of current version of the perfstat_partition_config data structure is returned.

Parameters

Item Description
name

Points to the memory area to be filled with the perfstat_partition_config_t structure. This parameter must be set to NULL.

userbuff

Points to the memory area to be filled with the perfstat_partition_config_t data structure.

sizeof_userbuff

Specifies the size of the perfstat_partition_config_t structure: sizeof(perfstat_partition_config_t).

Note: To obtain the size of the latest version of perfstat_partition_config_t, set the sizeof_userbuff parameter to zero, and the name and userbuff parameters to NULL.
desired_number

This parameter must be set to 1.

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_partition_config subroutine is unsuccessful if the following is true:

Item Description
EINVAL One of the parameters is not valid.

Files

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