[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

SpmiNextHot Subroutine

Purpose

Locates the next set of peer statistics SpmiHotVals belonging to an SpmiHotSet.

Library

SPMI Library (libSpmi.a)

Syntax

#include sys/Spmidef.h

struct SpmiHotVals *SpmiNextHot(HotSet, HotVals)
struct SpmiHotSet *HotSet;
struct SpmiHotVals *HotVals;

Description

The SpmiNextHot subroutine locates the next SpmiHotVals structure belonging to an SpmiHotSet, taking the set of peer statistics identified by the HotVals parameter as the current one. The subroutine returns a NULL value if no further SpmiHotVals structures are found. The SpmiNextHot subroutine should only be executed after a successful call to the SpmiGetHotSet subroutine and (usually, but not necessarily) a call to the SpmiFirstHot subroutine and one or more subsequent calls to SpmiNextHot.

The subroutine allows the application programmer to position at the next set of peer statistics in preparation for using the SpmiNextHotItem subroutine call to traverse this peer set's array of SpmiHotItems elements. Use of this subroutine is only necessary if it is desired to skip over some SpmiHotVals structures in an SpmiHotSet. Under most circumstances, the SpmiNextHotItem will be the sole means of accessing all elements of the SpmiHotItems arrays of all peer sets belonging to an SpmiHotSet.

This subroutine is part of the server option of the Performance Aide for AIX licensed product and is also included in the Performance Toolbox for AIX licensed product.

Parameters

HotSet

Specifies a valid pointer to an SpmiHotSet structure as obtained by a previous SpmiCreateHotSet call.

HotVals

Specifies a pointer to an SpmiHotVals structure as returned by a previous SpmiFirstHot or SpmiNextHot subroutine call or as returned by an SpmiAddSetHot subroutine call.

Return Values

The SpmiNextHot subroutine returns a pointer to the next SpmiHotVals structure within the hotset. If no more SpmiHotVals structures are available, the subroutine returns a NULL value. A returned pointer may refer to a pseudo-hotvals structure as described the SpmiAddSetHot subroutine.

Error Codes

All SPMI subroutines use external variables to provide error information. To access these variables, an application program must define the following external variables:

If the subroutine returns without an error, the SpmiErrno variable is set to 0 and the SpmiErrmsg character array is empty. If an error is detected, the SpmiErrno variable returns an error code, as defined in the sys/Spmidef.h file, and the SpmiErrmsg variable contains text, in English, explaining the cause of the error. See the List of SPMI Error Codes for more information.

Files

/usr/include/sys/Spmidef.h Declares the subroutines, data structures, handles, and macros that an application program can use to access the SPMI.

Related Information

For more information, see:

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]