perfstat_logicalvolume Subroutine

Purpose

Retrieves logical volume related metrics

Library

Perfstat Library (libperfstat.a)

Syntax

#include <libperfstat.h>

int perfstat_logicalvolume (name, userbuff, sizeof_struct, desired_number)
perfstat_id_t * name;
perfstat_logicalvolume_t * userbuff;
int sizeof_userbuff;
int desired_number;

Description

The perfstat_logicalvolume subroutine retrieves one or more logical volume statistics. It can also be used to retrieve the number of available logical volume.

To get one or more sets of logical volume metrics, set the name parameter to the name of the first logical volume for which the statistics are to be collected, and set the desired_number parameter. To start from the first logical volume, specify the quotation marks (“”) or FIRST_LOGICALVOLUME as the name. The userbuff parameter must always point to the memory area that is big enough to contain the number of perfstat_logicalvolume_t structures that this subroutine is to copy. Upon return, the name parameter is set to either the name of the next logical volume, or to “” after all of the structures are copied.

To retrieve the number of available sets of logical volume metrics, set the name parameter and the userbuff parameter to the value of null, and the desired_number parameter to the value of zero. The returned value is the number of available logical volumes.

Note: The perfstat_config must be called to enable the logical volume statistics collection. The perfstat_logicalvolume subroutine is not supported inside workload partitions.

Parameters

Item Description
name Contains the quotation marks (“”), FIRST_LOGICALVOLUME, or the name indicating the logical volume for which the statistics is to be retrieved
userbuff Points to the memory that is to be filled with the perfstat_logicalvolume_t structure
sizeof_struct Specifies the size of the perfstat_logicalvolume_t structure
desired_number Specifies the number of different logical volume statistics to be collected

Return Values

Upon successful completion, the number of structures filled is returned.

If unsuccessful, a value of -1 is returned.

Error Codes

The perfstat_logicalvolume 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

Files

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