perfstat_tape Subroutine

Purpose

Retrieves individual tape use statistics

Library

Perfstat Library (libperfstat.a)

Syntax

#include <libperfstat.h>
int perfstat_tape (name, userbuff, sizeof_struct, desired_number)
perfstat_id_t * name;
perfstat_tape_t * userbuff;
int sizeof_userbuff;
int desired_number;

Description

The perfstat_tape subroutine retrieves one or more tape use statistics. It can also be used to retrieve the number of available sets of tape.

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

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

Parameters

Item Description
name Contains the quotation marks (“”), FIRST_TAPE, or the name indicating the first tape for which the statistics are to be collected
userbuff Points to the memory that is to be filled with the perfstat_tape_t structure
sizeof_struct Specifies the size of the perfstat_tape_t structure
desired_number Specifies the number of different tape 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_tape 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 Cannot access dictionary

Files

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