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

Technical Reference: Base Operating System and Extensions , Volume 2

SpmiPathAddSetStat Subroutine


Adds a statistics value to a set of statistics.


SPMI Library (libSpmi.a)


#include sys/Spmidef.h

struct SpmiStatVals *SpmiPathAddSetStat(StatSet, StatName,
struct SpmiStatSet *StatSet;
char *StatName;
SpmiCxHdl Parent;


The SpmiPathAddSetStat subroutine adds a statistics value to a set of statistics. The SpmiStatSet structure that provides the anchor point to the set must exist before the SpmiPathAddSetStat subroutine call can succeed.



Specifies a pointer to a valid structure of type SpmiStatSet as created by the SpmiCreateStatSet Subroutine call.


Specifies the name of the statistic within the context identified by the Parent parameter.If the Parent parameter is NULL, you must specify the fully qualified path name of the statistic in the StatName parameter.


Specifies either a valid SpmiCxHdl handle as obtained by another subroutine call or a NULL value.

Return Values

The SpmiPathAddSetStat subroutine returns a pointer to a structure of type SpmiStatVals if successful. If unsuccessful, the subroutine returns a NULL value.

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.

Implementation Specifics

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.


/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 related information, see:

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