perfstat_ssp Subroutine
Purpose
Retrieves the shared storage pool (SSP) statistics and disks and Virtual Target Devices (VTDs) which are associated with SSP.
Library
Perfstat Library (libperfstat.a)
Syntax
#include <libperfstat.h>
int perfstat_ssp (name, userbuff, sizeof_struct, desired_number, spp_flag)
perfstat_id_t * name;
perfstat_ssp_t * userbuff;
size_t sizeof_struct;
int desired_number;
ssp_flag_t spp_flag;
Description
The perfstat_ssp subroutine retrieves the shared storage pool (SSP) statistics.
To retrieve the number of available disks in the SSP, set the name and userbuff parameters to NULL, and the desired_number parameter to 0 and flag to SSPDISK.
To retrieve the number of available VTDs in the SSP, set the name and userbuff parameters to NULL, and the desired_number parameter to 0 and flag to SSPVTD.
Parameters
Item | Description |
---|---|
name | Must be set to NULL. |
userbuff | Points to the memory area that is to be filled with the perfstat_ssp_t structure. Memory is allocated to the userbuff with the calculation (sizeof (perfstat_ssp_t) * returned_count), where returned_count is the value obtained by setting the name parameter and userbuff parameter to NULL and the desired_number parameter to zero. |
sizeof_struct | Specifies the size of the perfstat_ssp_t structure. |
desired_number | Must be set to 1. |
spp_flag | Must be set to one of the following values:
|
Usage of the SSPGLOBAL flag
- When the SSPGLOBAL flag is invoked with the name and userbuff parameters set to NULL, the perfstat_ssp subroutine returns the number of SSPs available.
- When the SSPGLOBAL flag is invoked with enough space allocated to the userbuff parameter based on the return value of the previous call, the perfstat_ssp subroutine populates the SSP statistics.
Usage of the SSPDISK flag
- When the SSPDISK flag is invoked with the name and userbuff parameters set to NULL, the perfstat_ssp subroutine returns the number of disks associated with any SSP.
- When the SSPDISK flag is invoked with enough space allocated to the userbuff parameter based on the return value of the previous call, the perfstat_ssp subroutine populates the disk information with the cluster and pool name.
Usage of the SSPVTD flag
- When the SSPVTD flag is invoked with the name and userbuff parameters set to NULL, the perfstat_ssp subroutine returns the number of logical units associated with the SSP.
- When the SSPVTD flag is invoked with enough space allocated to the userbuff parameter based on the return value of the previous call, the perfstat_ssp subroutine populates the logical unit name, VTD name and type, and size utilization to the respective fields along with the cluster and pool name.
Return Values
Upon successful completion, the number of structures filled is returned.
If unsuccessful, a value of -1 is returned.
Error Codes
The perfstat_ssp 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. |
ENOMSG | The dictionary is not accessible. |
ETIMEDOUT | The connection is timed out. |
Files
The libperfstat.h file defines standard macros, data types, and subroutines.