This appendix discusses the following topics:
Add a single set of peer statistics to an already defined SpmiHotSet (SpmiHotSet Structure).
RSI Library (libSpmi.a)
#include sys/Rsi.h
struct SpmiHotVals *RSiAddSetHot(rhandle, HotSet, StatName,
GrandParent,
maxresp, threshold, frequency, feed_type,
except_type, severity, trap_no)
RSiHandle rhandle;
struct SpmiHotSet *HotSet;
char *StatName;
cx_handle GrandParent;
int maxresp;
int threshold;
int frequency;
int feed_type;
int excp_type;
int severity;
int trap_no;
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
HotSet
Specifies a pointer to a valid structure of type SpmiHotSet
as created by the RSiCreateHotSet (RSiCreateHotSet Subroutine) subroutine call.
StatName
Specifies the name of the statistic within the subcontexts (peer
contexts) of the context identified by the GrandParent
parameter.
GrandParent
Specifies a valid cx_handle handle as obtained by another
subroutine call. The handle must identify a context with at least one
subcontext, which contains the statistic identified by the StatName
parameter. If the context specified is one of the RTime
contexts, no subcontext need to be created at the time the
SpmiAddSetHot subroutine call is issued; the presence of the
metric identified by the StatName parameter is checked against the
context class description.
If the context specified has or may have multiple levels of instantiable context below it (such as the FS and RTime/ARM contexts), the metric is only searched for at the lowest context level. The SpmiHotSet created is a pseudo hotvals structure used to link together a peer group of SpmiHotVals structures, which are created under the covers, one for each subcontext of the GrandParent context. In the case of RTime/ARM, if additional contexts are later added under the GrandParent contexts, additional hotsets are added to the peer group. This is transparent to the application program, except that the RSiGetHotItem (RSiGetHotItem Subroutine) subroutine call will return the peer group SpmiHotVals pointer rather than the pointer to the pseudo structure.
Note that specifying a specific volume group context (such as FS/rootvg) or a specific application context (such as RTime/ARN/armpeek) is still valid and won't involve creation of pseudo SpmiHotVals structures.
maxresp
Must be non-zero if excp_type specifies that exceptions or
SNMP traps must be generated. If specified as zero, indicates that all
SpmiHotItems that meet the criteria specified by
threshold must be returned, up-to a maximum of maxresp
items. If both exceptions/traps and feeds are requested, the
maxresp value is used to cap the number of exceptions/alerts as
well as the number of items returned. If feed_type is
specified as SiHotAlways, the maxresp parameter is still
used to return at most maxresp items.
Where the GrandParent argument specifies a context that has multiple levels of instantiable contexts below it, the maxresp is applied to each of the lowest level contexts above the the actual peer contexts at a time. For example, if the GrandParent context is FS (file systems) and the system has three volume groups, then a maxresp value of 2 could cause up to a maximum of 2 x 3 = 6 responses to be generated.
threshold
Must be non-zero if excp_type specifies that exceptions or
SNMP traps must be generated. If specified as zero, indicates that all
values read qualify to be returned in feeds. The value specified is
compared to the data value read for each peer statistic. If the data
value exceeds the threshold, it qualifies to be returned as an
SpmiHotItems element in the SpmiHotVals
structure. If the threshold is specified as a negative
value, the value qualifies if it is lower than the numeric value of
threshold. If feed_type is specified as
SiHotAlways, the threshold value is ignored for feeds. For
peer statistics of type SiCounter, the threshold must be
specified as a rate per second; for SiQuantity statistics the
threshold is specified as a level.
frequency
Must be non-zero if excp_type specifies that exceptions or
SNMP traps must be generated. Ignored for feeds. Specifies the
minimum number of minutes that must expire between any two exceptions/traps
generated from this SpmiHotVals (SpmiHotVals Structure) structure. This value must be specified as no
less than 5 minutes.
feed_type
Specifies if feeds of SpmiHotItems should be returned for
this SpmiHotVals structure. The following values are
valid:
excp_type
Controls the generation of exception data packets and/or the generation
of SNMP Traps from xmservd. Note that these types of
packets and traps can only actually be sent if xmservd is
running. Because of this, exception packets and SNMP traps are only
generated as long as xmservd is active. Traps can only be
generated on AIX. The conditions for generating exceptions and traps
are controlled by the threshold and frequency
parameters. The following values are valid for
excp_type:
severity
Required to be positive and greater than zero if exceptions are
generated, otherwise specify as zero. Used to assign a severity code to
the exception for display by exmon.
trap_no
Required to be positive and greater than zero if SNMP traps are
generated, otherwise specify as zero. Used to assign the trap number in
the generated SNMP trap.
If successful, the subroutine returns a pointer to a structure of type struct SpmiHotVals (SpmiHotVals Structure). If an error occurs, NULL is returned and an error text may be placed in the external character array RSiEMsg. If you attempt to add more values to a statset than the current local buffer size allows, RSiErrno is set to RSiTooMany. If you attempt to add more values than the buffer size of the remote host's xmservd daemon allows, RSiErrno is set to RSiBadStat and the status field in the returned packet is set to too_many_values.
The external integer RSiMaxValues holds the maximum number of values acceptable with the data-consumer's buffer size.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes) .
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Changes the frequency at which the xmservd on the host identified by the first argument daemon is sending data_feed packets for a statset.
RSI Library (libSpmi.a)
#include sys/Rsi.h
int RSiChangeFeed(rhandle, statset, msecs) RSiHandle rhandle;struct SpmiStatSet *statset;int msecs;
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
statset
Must be a pointer to a structure of type struct SpmiStatSet (SpmiStatSet Structure), which was previously returned by a successful
RSiCreateStatSet (RSiCreateStatSet Subroutine) subroutine call. Data feeding must have
been started for this SpmiStatSet via a previous RSiStartFeed
(RSiStartFeed Subroutine) subroutine call.
msecs
The number of milliseconds between the sending of data_feed
packets. This number is rounded to a multiple of
min_remote_int milliseconds by the xmservd daemon on the
remote host. This minimum interval can be modified through the
-i command line interval to xmservd.
If successful, the subroutine returns zero, otherwise -1. A NULL error text is placed in the external character array RSiEMsg regardless of the subroutine's success or failure.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Changes the frequency at which the xmservd on the host identified by the first argument daemon is sending hot_feed packets for a statset or checking if exceptions or SNMP traps should be generated.
RSI Library (libSpmi.a)
#include sys/Rsi.h
int RSiChangeFeed(rhandle, hotset, msecs) RSiHandle rhandle;struct SpmiHotSet *hotset;int msecs;
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
hotset
Must be a pointer to a structure of type struct SpmiHotSet (SpmiHotSet Structure), which was previously returned by a successful
RsiCreateHotSet (RSiCreateHotSet Subroutine) subroutine call. Data feeding must have
been started for this SpmiHotSet via a previous
RSiStartHotFeed (RSiStartHotFeed Subroutine) subroutine call.
msecs
The number of milliseconds between the sending of Hot_feed
packets. This number is rounded to a multiple of
min_remote_int milliseconds by the xmservd daemon on the
remote host. This minimum interval can be modified through the
-i command line interval to xmservd.
If successful, the subroutine returns zero, otherwise -1. A NULL error text is placed in the external character array RSiEMsg regardless of the subroutine's success or failure.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
In the sample program, the SpmiStatSet is created in the local function lststats shown previously in lines 6 through 10.
Terminates the RSI interface for a remote host connection.
RSI Library (libSpmi.a)
#include sys/Rsi.h
void RSiClose(rhandle) RSiHandle rhandle;
The RSiClose subroutine is responsible for:
A successful RSiOpen (RSiOpen Subroutine) subroutine creates tables on the remote host it was issued against. Therefore, a data consumer program that has issued successful RSiOpen subroutine calls should issue an RSiClose (RSiClose Subroutine) subroutine call for each RSiOpen call before the program exits so that the tables in the remote xmservd daemon can be released.
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen subroutine.
The macro RSiIsOpen can be used to test whether an RSI handle is open. It takes an RSiHandle as argument and returns true (1) if the handle is open, otherwise false (0).
This subroutine is part of the Performance Toolbox for AIX licensed product.
/usr/include/sys/Rsi.h
Declares the subroutines, data structures, handles, and macros that an
application program can use to access the RSI.
For related information, see:
Creates an empty hotset on the remote host identified by the argument.
RSI Library (libSpmi.a)
#include sys/Rsi.h
struct SpmiHotSet *RSiCreateHotSet(rhandle) RSiHandle rhandle;
The RSiCreateHotSet subroutine allocates an SpmiHotSet (SpmiHotSet Structure) structure. The structure is initialized as an empty SpmiHotSet and a pointer to the SpmiHotSet structure is returned.
The SpmiHotSet structure provides the anchor point to a set of peer statistics and must exist before the RSiAddSetHot (RSiAddSetHot Subroutine) subroutine can be successfully called.
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
The RSiCreateHotSet subroutine returns a pointer to a structure of type SpmiHotSet if successful. If unsuccessful, the subroutine returns a NULL value.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Creates an empty statset on the remote host identified by the argument.
RSI Library (libSpmi.a)
#include sys/Rsi.h
struct SpmiStatSet *RSiCreateStatSet(rhandle) RSiHandle rhandle;
The RSiCreateStatSet subroutine allocates an SpmiStatSet (SpmiStatSet Structure) structure. The structure is initialized as an empty SpmiStatSet and a pointer to the SpmiStatSet structure is returned.
The SpmiStatSet structure provides the anchor point to a set of statistics and must exist before the RSiPathAddSetStat (RSiPathAddSetStat Subroutine) subroutine can be successfully called.
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
The RSiCreateStatSet subroutine returns a pointer to a structure of type SpmiStatSet if successful. If unsuccessful, the subroutine returns a NULL value.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Deletes a single set of peer statistics identified by an SpmiHotVals (SpmiHotVals Structure) structure from an SpmiHotSet (SpmiHotSet Structure).
RSI Library (libSpmi.a)
#include sys/Rsi.h
int RSiDelSetHot(rhandle, hsp, hvp) RSiHandle rhandle;struct SpmiHotSet *hsp;struct SpmiHotVals*hvp;
The RSiDelSetHot subroutine performs the following actions:
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
hsp
Must be a pointer to a structure type struct SpmiHotSet (SpmiHotSet Structure), which was previously returned by a successful
RSiCreateHotSet (RSiCreateHotSet Subroutine) subroutine call.
hvp
Must be a handle of type struct SpmiHotVals (SpmiHotVals Structure) as returned by a successful RSiAddSetHot (RSiAddSetHot Subroutine) subroutine call. You cannot
specify an SpmiHotVals that was internally generated by the Spmi
library code as described under the GrandParent parameter to
RSiAddSetHot (RSiAddSetHot Subroutine).
If successful, the subroutine returns a zero value; otherwise it returns a non-zero value and an error text may be placed in the external character array RSiEMsg.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Deletes a single statistic identified by an SpmiStatVals (SpmiStatVals Structure) pointer from an SpmiStatSet (SpmiStatSet Structure).
RSI Library (libSpmi.a)
#include sys/Rsi.h
int RSiDelSetStat(rhandle, ssp, svp) RSiHandle rhandle;struct SpmiStatSet *ssp;struct SpmiStatVals*svp;
The RSiDelSetStat subroutine performs the following actions:
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
ssp
Must be a pointer to a structure type struct SpmiStatSet (SpmiStatSet Structure), which was previously returned by a successful
RSiCreateStatSet (RSiCreateStatSet Subroutine) subroutine call.
svp
Must be a handle of type struct SpmiStatVals (SpmiStatVals Structure) as returned by a successful RSiPathAddSetStat (RSiPathAddSetStat Subroutine) subroutine call.
If successful, the subroutine returns a zero value; otherwise it returns a non-zero value and an error text may be placed in the external character array RSiEMsg.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Returns the first subcontext of an SpmiCx (SpmiCx Structure) context.
RSI Library (libSpmi.a)
#include sys/Rsi.h
struct SpmiCxLink *RSiFirstCx(rhandle, context, name, descr) RSiHandle rhandle; cx_handle *context; char **name; char **descr;
The RSiFirstCx subroutine performs the following actions:
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
context
Must be a handle of type cx_handle, which was previously
returned by a successful RSiPathGetCx (RSiPathGetCx Subroutine) subroutine call.
name
Must be a pointer to a pointer to a character array. The pointer
must be initialized to point at a character array pointer. When the
subroutine call is successful, the short name of the subcontext is returned in
the character array pointer.
descr
Must be a pointer to a pointer to a character array. The pointer
must be initialized to point at a character array pointer. When the
subroutine call is successful, the description of the subcontext is returned
in the character array pointer.
If successful, the subroutine returns a pointer to a structure of type struct SpmiCxLink (SpmiCxLink Structure). If an error occurs or if the context doesn't contain subcontexts, NULL is returned and an error text may be placed in the external character array RSiEMsg.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Returns the first statistic of an SpmiCx (SpmiCx Structure) context.
RSI Library (libSpmi.a)
#include sys/Rsi.h
struct SpmiStatLink *RSiFirstStat(rhandle, context, name, descr) RSiHandle rhandle; cx_handle *context; char **name; char **descr;
The RSiFirstStat subroutine performs the following actions:
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
context
Must be a handle of type cx_handle, which was previously
returned by a successful RSiPathGetCx (RSiPathGetCx Subroutine) subroutine call.
name
Must be a pointer to a pointer to a character array. The pointer
must be initialized to point at a character array pointer. When the
subroutine call is successful, the short name of the statistics value is
returned in the character array pointer.
descr
Must be a pointer to a pointer to a character array. The pointer
must be initialized to point at a character array pointer. When the
subroutine call is successful, the description of the statistics value is
returned in the character array pointer.
If successful, the subroutine returns a pointer to a structure of type struct SpmiStatLink (SpmiStatLink Structure). If an error occurs, NULL is returned and an error text may be placed in the external character array RSiEMsg.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Locates and decodes the next SpmiHotItems element at the current position in an incoming data packet of type hot_feed.
RSI Library (libSpmi.a)
#include sys/Rsi.h
struct SpmiHotVals *RSiGetHotItem(rhandle, HotSet, index, value, absvalue, name) RSiHandle rhandle; struct SpmiHotSet **HotSet; int *index; float *value; flost absvalue; char **name;
The RSiGetHotItem subroutine locates the SpmiHotItems structure in the hot_feed data packet indexed by the value of the index parameter. The subroutine returns a NULL value if no further SpmiHotItems structures are found. The RSiGetHotItem subroutine should only be executed after a successful call to the RSiGetHotSet subroutine.
The RSiGetHotItem subroutine is designed to be used for walking all SpmiHotItems elements returned in a hot_feed data packet. Because the data packet may contain elements belonging to more than one SpmiHotSet, the index is purely abstract and is only used to keep position. By feeding the updated integer pointed to by index back to the next call, the walking of the hot_feed packet can be done in a tight loop. Successful calls to RSiGetHotItem will decode each SpmiHotItems element and return the data value in value and the name of the peer context that owns the corresponding statistic in name.
| rhandle | Must be an RSiHandle, which was previously initialized by the RSiOpen (RSiOpen Subroutine) subroutine. |
| HotSet | Used to return a pointer to a valid SpmiHotSet (SpmiHotSet Structure) structure as obtained by a previous RSiCreateHotSet (RSiCreateHotSet Subroutine) subroutine call. The calling program can use this value to locate the SpmiHotSet if its address was stored by the program after it was created. The time stamps in the SpmiHotSet are updated with the time stamps of the decoded SpmiHotItems element. |
| index | A pointer to an integer that contains the desired relative element number in the SpmiHotItems array across all SpmiStatVals (SpmiStatVals Structure) contained in the data packet. A value of zero points to the first element. When the RSiGetHotItem subroutine returns, the integer contain the index of the next SpmiHotItems element in the data packet. By passing the returned index parameter to the next call to RSiGetHotItem, the calling program can iterate through all SpmiHotItems elements in the hot_feed data packet. |
| value | A pointer to a float variable. A successful call will return the
decoded data value of the peer statistic. Before the value is returned,
the RSiGetHotItem function:
|
| absvalue | A pointer to a float variable. A successful call will return the decoded value of the val field of the SpmiHotItems structure of the peer statistic. In case of a statistic of type SiQuantity, this value will be the same as the one returned in the argument value. In case of a peer statistic of type SiCounter, the value returned is the absolute value of the counter. |
| name | A pointer to a character pointer. A successful call will return a pointer to the name of the peer context for which the data value was read. |
The RSiGetHotItem subroutine returns a pointer to the current
SpmiHotVals (SpmiHotVals Structure) structure within the hotset. If no more
SpmiHotItems elements are available, the subroutine returns a NULL
value. The structure returned contains the data, such as threshold,
which may be relevant for presentation of the results of an
SpmiGetHotSet subroutine call to end-users. In the returned
SpmiHotVals structure, all fields contain the correct values as
declared, except for the following:
| stat | Declared as SpmiStatHdl, actually points to a valid SpmiStat (SpmiStat Structure) structure. By casting the handle to a pointer to SpmiStat, data in the structure can be accessed. |
| grandpa | Contains the cx_handle for the parent context of the peer contexts. |
| items | When using the Spmi interface this is an array of SpmiHotItems structures. When using the RSiGetHotItem subroutine, the array is empty and attempts to access it will likely result in segmentation faults or access of not valid data. |
| path | Will contain the path to the parent of the peer contexts. Even when the peer contexts are multiple levels below the parent context, the path points to the top context because the peer context identifiers in the SpmiHotItems elements will contain the path name from there and on. For example, if the hotvals peer set defines all volume groups, the path specified in the returned SpmiHotVals structure would be "FS" and the path name in one SpmiHotItems element may be "rootvg/lv01". When combined with the metric name from the stat field, the full path name can be constructed as, for example, "FS/rootvg/lv01/%totfree". |
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Returns a pointer to a valid SpmiStatVals (SpmiStatVals Structure) structure for a given SpmiStatVals pointer by extraction from a data_feed packet. This subroutine call should only be issued from a callback function after it has been verified that a data_feed packet was received from the host identified by the first argument.
RSI Library (libSpmi.a)
#include sys/Rsi.h
struct SpmiStatVals RSiGetRawValue(rhandle, svp, index) RSiHandle rhandle; struct SpmiStatVals *svp; int *index;
The RSiGetRawValue subroutine performs the following:
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
svp
A handle of type struct SpmiStatVals (SpmiStatVals Structure), which was previously returned by a successful
RSiPathAddSetStat (RSiPathAddSetStat Subroutine) subroutine call.
index
A pointer to an integer variable. When the subroutine call
succeeds, the index into the ValsSet array of the data feed packet
is returned. The index corresponds to the element that matches the
svp argument to the subroutine.
If successful, the subroutine returns a pointer; otherwise NULL is returned and an error text may be placed in the external character array RSiEMsg.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Returns a data value for a given SpmiStatVals (SpmiStatVals Structure) pointer by extraction from the data_feed packet. This subroutine call should only be issued from a callback function after it has been verified that a data_feed packet was received from the host identified by the first argument.
RSI Library (libSpmi.a)
#include sys/Rsi.h
float RSiGetValue(rhandle, svp) RSiHandle rhandle; struct SpmiStatVals *svp;
The RSiGetValue subroutine provides the following:
rhandle
Must be an RSiHandle, previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
svp
A handle of type struct SpmiStatVals (SpmiStatVals Structure), which was previously returned by a successful
RSiPathAddSetStat (RSiPathAddSetStat Subroutine) subroutine call.
If successful, the subroutine returns a non-negative value; otherwise it returns a negative value less than or equal to -1.0. A NULL error text is placed in the external character array RSiEMsg regardless of the subroutine's success or failure.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Allocates or changes the table of RSi handles.
RSI Library (libSpmi.a)
#include sys/Rsi.h
RSiHandle RSiInit(count) int count;
Before any other RSi call is executed, a data-consumer program must issue the RSiInit call. Its purpose is to either:
count
Must specify the number of elements in the array of RSi handles.
If the call is used to expand a previously allocated array, this argument must
be larger than the current number of array elements. It must always be
larger than zero. Specify the size of the array to be at least as large
as the number of hosts your data-consumer program can talk to at any point in
time.
If successful, the subroutine returns the address of the allocated array. If an error occurs, an error text is placed in the external character array RSiEMsg and the subroutine returns NULL. When used to increase the size of a previously allocated array, the subroutine first allocates the new array, then moves the entire old array to the new area. Application programs should, therefore, refer to elements in the RSi handle array by index rather than by address if they anticipate the need for expanding the array. The array only needs to be expanded if the number of remote hosts a data-consumer program talks to might increase over the life of the program.
An application that calls RSiInit repeatedly needs to preserve the previous address of the RSiHandle array while the RSiInit call is re-executed. After the call has completed successfully, the calling program should free the previous array using the free subroutine.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see the RSiClose Subroutine.
Creates (instantiates) all subcontexts of an SpmiCx (SpmiCx Structure) context object.
RSI Library (libSpmi.a)
#include sys/Rsi.h
int RSiInstantiate(rhandle, context) RSiHandle rhandle; cx_handle *context;
The RSiInstantiate subroutine performs the following actions:
The RSiInstantiate subroutine explicitly instantiates the subcontexts of an instantiable context. If the context is not instantiable, do not call the RSiInstantiate subroutine.
rhandle
Must point to a structure of type RSiHandle, which was
previously initialized by the RSiOpen (RSiOpen Subroutine) subroutine.
context
Must be a handle of type cx_handle, which was previously
returned by a successful RSiPathGetCx (RSiPathGetCx Subroutine) subroutine call.
If successful, the subroutine returns a zero value; otherwise it returns an error code as defined in SiError and an error text may be placed in the external character array RSiEMsg.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Invites data suppliers on the network to identify themselves and returns a table of data-supplier host names.
RSI Library (libSpmi.a)
#include sys/Rsi.h
char **RSiInvite(resy_callb, excp_callb) int (*resy_callb)(); int (*excp_callb)();
The RSiInvite subroutine call broadcasts are_you_there messages on the network to provoke xmservd daemons on remote hosts to respond and returns a table of all responding hosts.
The arguments to the subroutine are:
resy_callb
Must be either NULL or a pointer to a function that processes
i_am_back packets as they are received from the xmservd
daemons on remote hosts for the duration of the RSiInvite
subroutine call. When the callback function is invoked, it is passed
three arguments as described in the following information.
If this argument is specified as NULL, a callback function internal to the RSiInvite subroutine receives any i_am_back packets and uses them to build the table of host names the function returns.
excp_callb
Must be NULL or a pointer to a function that processes
except_rec packets as they are received from the xmservd
daemons on remote hosts. If a NULL pointer is passed, your application
does not receive except_rec messages. When this callback
function is invoked, it is passed three arguments as described in the
following information.
This argument always overrides the corresponding argument of any previous RSiInvite or RSiOpen call, and it can be overridden by subsequent executions of either. In this way, your application can turn exception monitoring on and off. For an RSiOpen to override the exception processing specified by a previous open call, the connection must first be closed with the RSiClose call. That's because an RSiOpen against an already active handle is treated as a no-operation.
The resy_callb and excp_callb functions in your application are called with the following three arguments:
If successful, the subroutine returns an array of character pointers, each of which contains a host name of a host that responded to the invitation. The returned host names are actually constructed as two "words" with the first one being the host name returned by the host in response to an are_you_there request; the second one being the character form of the host's IP address. The two "words" are separated by one or more blanks. This format is suitable as an argument to the RSiOpen (RSiOpen Subroutine) subroutine call. In addition, the external integer variable RSiInvTabActive contains the number of host names found. The returned pointer to an array of host names must not be freed by the subroutine call. The calling program should not assume that the pointer returned by this subroutine call remains valid after subsequent calls to RSiInvite. If the call is not successful, an error text is placed in the external character array RSiEMsg, an error number is placed in RSiErrno, and the subroutine returns NULL.
The list of host names returned by RSiInvite does not include the hosts your program has already established a connection with through an RSiOpen call. Your program is responsible for keeping track of such hosts. If you need a list of both sets of hosts, either let the RSiInvite call be the first one issued from your program or merge the list of host names returned by the call with the list of hosts to which you have connections.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, seeRSiOpen Subroutine.
Allows an application to suspend execution and wait to get awakened when data feeds arrive.
RSI Library (libSpmi.a)
#include sys/Rsi.h
void RSiMainLoop(msecs) int msecs;
The RSiMainLoop subroutine:
To work properly, the RSiMainLoop subroutine requires that at least one RSiOpen (RSiOpen Subroutine) call has been successfully completed and that the connection has not been closed.
msecs
The minimum elapsed time in milliseconds that the subroutine should
continue to attempt receives before returning to the caller. Notice
that your program releases control for as many milliseconds you specify but
that the callback functions defined on the RSiOpen call may be
called repetitively during that time.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see RSiOpen Subroutine.
Returns the next subcontext of an SpmiCx (SpmiCx Structure) context.
RSI Library (libSpmi.a)
#include sys/Rsi.h
struct SpmiCxLink *RSiNextCx(rhandle, context, link, name, descr) RSiHandle rhandle; cx_handle *context; struct SpmiCxLink *link; char **name; char **descr;
The RSiNextCx subroutine:
rhandle
Must point to a structure of type RSiHandle, which was
previously initialized by the RSiOpen (RSiOpen Subroutine) subroutine.
context
Must be a handle of type cx_handle, which was previously
returned by a successful RSiPathGetCx (RSiPathGetCx Subroutine) subroutine call.
link
Must be a pointer to a structure of type struct SpmiCxLink (SpmiCxLink Structure), which was previously returned by a successful
RSiFirstCx (RSiFirstCx Subroutine) or RSiNextCx (RSiNextCx Subroutine) subroutine call.
name
Must be a pointer to a pointer to a character array. The pointer
must be initialized to point at a character array pointer. When the
subroutine call is successful, the short name of the subcontext is returned in
the character array pointer.
descr
Must be a pointer to a pointer to a character array. The pointer
must be initialized to point at a character array pointer. When the
subroutine call is successful, the description of the subcontext is returned
in the character array pointer.
If successful, the subroutine returns a pointer to a structure of type struct SpmiCxLink (SpmiCxLink Structure). If an error occurs, or if no more subcontexts exist for the context, NULL is returned and an error text may be placed in the external character array RSiEMsg.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Returns the next statistic of an SpmiCx (SpmiCx Structure) context.
RSI Library (libSpmi.a)
#include sys/Rsi.h
struct SpmiStatLink *RSiNextStat(rhandle, context, link, name, descr) RSiHandle rhandle; cx_handle *context; struct SpmiStatLink *link; char **name; char **descr;
The RSiNextStat subroutine:
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
context
Must be a handle of type cx_handle, which was previously
returned by a successful RSiPathGetCx (RSiPathGetCx Subroutine) subroutine call.
link
Must be a pointer to a structure of type struct SpmiStatLink (SpmiStatLink Structure), which was previously returned by a successful
RSiFirstStat (RSiFirstStat Subroutine) or RSiNextStat subroutine
call.
name
Must be a pointer to a pointer to a character array. The pointer
must be initialized to point at a character array pointer. When the
subroutine call is successful, the short name of the statistics value is
returned in the character array pointer.
descr
Must be a pointer to a pointer to a character array. The pointer
must be initialized to point at a character array pointer. When the
subroutine call is successful, the description of the statistics value is
returned in the character array pointer.
If successful, the subroutine returns a pointer to a structure of type struct SpmiStatLink. If an error occurs, or if no more statistics exists for the context, NULL is returned and an error text may be placed in the external character array RSiEMsg.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Initializes the RSi interface for a remote host.
RSI Library (libSpmi.a)
#include sys/Rsi.h
int RSiOpen(rhandle, wait, bufsize, hostID, feed_callb,
resy_callb, excp_callb)
RSiHandle rhandle;
int wait;
int bufsize;
char *hostID;
int (*feed_callb)();
int (*resy_callb)();
int (*excp_callb)();
The RSiOpen subroutine performs the following actions:
The arguments to the subroutine are:
rhandle
Must point to an element of the RSiHandleStruct array, which
is returned by a previous RSiInit (RSiInit Subroutine) call. If the subroutine is successful the
structure is initialized and ready to use as a handle for subsequent RSi
interface subroutine calls.
wait
Must specify the timeout in milliseconds that the RSi interface shall
wait for a response when using the request-response functions. On LANs,
a reasonable value for this argument is 100 milliseconds. If the
response is not received after the specified wait time, the library
subroutines retry the receive operation until five times the wait time has
elapsed before returning a timeout indication. The wait time must be
zero or more milliseconds.
bufsize
Specifies the maximum buffer size to be used for constructing network
packets. This size must be at least 4,096 bytes. The buffer size
determines the maximum packet length that can be received by your program and
sets the limit for the number of data values that can be received in one
data_feed packet. There's no point in setting the
buffer size larger than that of the xmservd daemon because both
must be able to handle the packets. If you need large sets of values,
you can use the command line argument -b of xmservd to
increase its buffer size up to 16,384 bytes.
The fixed part of a data_feed packet is 104 bytes and each value takes 32 bytes. A buffer size of 4,096 bytes allows up to 124 values per packet.
hostID
Must be a character array containing the identification of the remote
host whose xmservd daemon is the one with which you want to
talk. The first characters of the host identification (up to the first
white space) is used as the host name. The full host identification is
stored in the RSiHandle field longname and may contain
any description that helps the end user identify the host used. The
host name may be either in long format (including domain name) or in short
format.
feed_callb
Must be a pointer to a function that processes data_feed
packets as they are received from the xmservd daemon. When
this callback function is invoked, it is passed three arguments as described
in the following information.
resy_callb
Must be a pointer to a function that processes i_am_back
packets as they are received from the xmservd daemon. When
this callback function is invoked it is passed three arguments as described in
the following information.
excp_callb
Must be NULL or a pointer to a function that processes
except_rec packets as they are received from the xmservd
daemon. If a NULL pointer is passed, your application does not receive
except_rec messages. When this callback function is invoked,
it is passed three arguments as described in the following information.
This argument always overrides the corresponding argument of any previous
RSiInvite (RSiInvite Subroutine) or RSiOpen (RSiOpen Subroutine) subroutine call and can itself
be overridden by subsequent executions of either. In this way, your
application can turn exception monitoring on and off. For an
RSiOpen call to override the exception processing specified by a
previous open call, the connection must first be closed with the RSiClose
(RSiClose Subroutine) subroutine call.
The feed_callb, resy_callb, and excp_callb functions are called with the arguments:
RSiHandle. When a data_feed packet is received, the structure pointed to is guaranteed to represent the host sending the packet. In all other situations the RSiHandle structure may represent any of the hosts to which your application is talking.
Pointer of type pack * to the input buffer containing the received packet. In callback functions, always use this pointer rather than the pointer in the RSiHandle structure.
Pointer of type struct sockaddr_in * to the IP address of the originating host.
If successful, the subroutine returns zero and initializes the array element of type RSiHandle pointed to by rhandle. If an error occurs, error text is placed in the external character array RSiEMsg and the subroutine returns a negative value.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Add a single statistics value to an already defined SpmiStatSet (SpmiStatSet Structure).
RSI Library (libSpmi.a)
#include sys/Rsi.h
struct SpmiStatVals *RSiPathAddSetStat(rhandle, statset, path) RSiHandle rhandle; struct SpmiStatSet *statset; char *path;
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
statset
Must be a pointer to a structure of type struct SpmiStatSet,
which was previously returned by a successful RSiCreateStatSet (RSiCreateStatSet Subroutine) subroutine call.
path
Must be the full value path name of the statistics value to add to the
SpmiStatSet. The value path name must not include a
terminating slash. Note that value path names never start with a
slash.
If successful, the subroutine returns a pointer to a structure of type struct SpmiStatVals (SpmiStatVals Structure). If an error occurs, NULL is returned and an error text may be placed in the external character array RSiEMsg. If you attempt to add more values to a statset than the current local buffer size allows, RSiErrno is set to RSiTooMany. If you attempt to add more values than the buffer size of the remote host's xmservd daemon allows, RSiErrno is set to RSiBadStat and the status field in the returned packet is set to too_many_values.
The external integer RSiMaxValues holds the maximum number of values acceptable with the data-consumer's buffer size.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Searches the context hierarchy for an SpmiCx (SpmiCx Structure) context that matches a context path name.
RSI Library (libSpmi.a)
#include sys/Rsi.h
cx_handle *RSiPathGetCx(rhandle, path) RSiHandle rhandle; char *path;
The RSiPathGetCx subroutine performs the following actions:
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
path
A path name of a context for which a handle is to be returned.
The context path name must be the full path name and must not include a
terminating slash. Note that context path names never start with a
slash.
If successful, the subroutine returns a handle defined as a pointer to a structure of type cx_handle. If an error occurs, NULL is returned and an error text may be placed in the external character array RSiEMsg.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Finds the full path name of a statistic identified by a SpmiStatVals (SpmiStatVals Structure) pointer.
RSI Library (libSpmi.a)
#include sys/Rsi.h
char *RSiStatGetPath(rhandle, svp) RSiHandle rhandle; struct SpmiStatVals *svp;
The RSiStatGetPath subroutine performs the following:
The memory area pointed to by the returned pointer is freed when the RSiStatGetPath subroutine call is repeated. For each invocation of the subroutine, a new memory area is allocated and its address returned.
If the calling program needs the returned character string after issuing the RSiStatGetPath subroutine call, the program must copy the returned string to locally allocated memory before reissuing the subroutine call.
rhandle
Must be an RSiHandle, previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
svp
Must be a handle of type struct SpmiStatVals as returned by a
successful RSiPathAddSetStat (RSiPathAddSetStat Subroutine) subroutine call.
If successful, the RSiStatGetPath subroutine returns a pointer to a character array containing the full path name of the statistic. If unsuccessful, the subroutine returns a NULL value and an error text may be placed in the external character array RSiEMsg.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Tells xmservd to start sending data feeds for a statset.
RSI Library (libSpmi.a)
#include sys/Rsi.h
int RSiStartFeed(rhandle, statset, msecs) RSiHandle rhandle; struct SpmiStatSet *statset; int msecs;
The RSiStartFeed subroutine performs the following function:
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
statset
Must be a pointer to a structure of type struct SpmiStatSet (SpmiStatSet Structure), which was previously returned by a successful
RSiCreateStatSet (RSiCreateStatSet Subroutine) subroutine call.
msecs
The number of milliseconds between the sending of data_feed
packets. This number is rounded to a multiple of
min_remote_int milliseconds by the xmservd daemon on the
remote host. This minimum interval can be modified through the
-i command line interval to xmservd.
If successful, the subroutine returns zero; otherwise it returns -1 and an error text may be placed in the external character array RSiEMsg.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Tells xmservd to start sending hot feeds for a hotset or to start checking for if exceptions or SNMP traps should be generated.
RSI Library (libSpmi.a)
#include sys/Rsi.h
int RSiStartFeed(rhandle, hotset, msecs) RSiHandle rhandle; struct SpmiHotSet *hotset; int msecs;
The RSiStartHotFeed subroutine performs the following function:
rhandle
Must be an RSiHandle, which was previously initialized by the
RSiOpen (RSiOpen Subroutine) subroutine.
hotset
Must be a pointer to a structure of type struc SpmiHotSet (SpmiHotSet Structure), which was previously returned by a successful
RSiCreateHot (RSiCreateHotSet Subroutine) subroutine call.
msecs
The number of milliseconds between the sending of hot_feed
packets and/or the number of milliseconds between checks for if exceptions or
SNMP traps should be generated. This number is rounded to a
multiple of min_remote_int milliseconds by the xmservd
daemon on the remote host. This minimum interval can be modified
through the -i command line interval to xmservd.
If successful, the subroutine returns zero; otherwise it returns -1 and an error text may be placed in the external character array RSiEMsg.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Tells xmservd to stop sending data feeds for a statset.
RSI Library (libSpmi.a)
#include sys/Rsi.h
int RSiStopFeed(rhandle, statset, erase) RSiHandle rhandle; struct SpmiStatSet *statset; boolean erase;
The RSiStopFeed subroutine instructs the xmservd of a remote system to:
rhandle
Must point to a structure of type RSiHandle, which was
previously initialized by the RSiOpen (RSiOpen Subroutine) subroutine.
statset
Must be a pointer to a structure of type struct SpmiStatSet,
which was previously returned by a successful RSiCreateStatSet (RSiCreateStatSet Subroutine) subroutine call. Data feeding must have been
started for this SpmiStatSet via a previous RSiStartFeed (RSiStartFeed Subroutine) subroutine call.
erase
If this argument is set to true, the xmservd daemon on the
remote host discards all information about the named
SpmiStatSet. Otherwise the daemon maintains its definition
of the set of statistics.
If successful, the subroutine returns zero, otherwise -1. A NULL error text is placed in the external character array RSiEMsg regardless of the subroutine's success or failure.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see:
Tells xmservd to stop sending hot feeds for a hotset and to stop checking for exception and SNMP trap generation.
RSI Library (libSpmi.a)
#include sys/Rsi.h
int RSiStopFeed(rhandle, hotset, erase) RSiHandle rhandle; struct SpmiHotSet *hotset; boolean erase;
The RSiStopHotFeed subroutine instructs the xmservd of a remote system to:
rhandle
Must point to a structure of type RSiHandle, which was
previously initialized by the RSiOpen (RSiOpen Subroutine) subroutine.
hotset
Must be a pointer to a structure of type struct SpmiHotSet,
which was previously returned by a successful RSiCreateHotSet (RSiCreateHotSet Subroutine) subroutine call. Data feeding must have been
started for this SpmiStatSet via a previous RSiStartHotFeed (RSiStartHotFeed Subroutine) subroutine call.
erase
If this argument is set to true, the xmservd daemon on the
remote host discards all information about the named
SpmiHotSet. Otherwise the daemon maintains its definition of
the set of statistics.
If successful, the subroutine returns zero, otherwise -1. A NULL error text is placed in the external character array RSiEMsg regardless of the subroutine's success or failure.
All RSI 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 RSiErrno variable is set to RSiOkay and the RSiEMsg character array is empty. If an error is detected, the RSiErrno variable returns an error code, as defined in the enum RSiErrorType. RSi error codes are described in List of RSi Error Codes (List of SPMI Error Codes).
This subroutine is part of the Performance Toolbox for AIX licensed product.
| /usr/include/sys/Rsi.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the RSI. |
For related information, see: