Infrasctucture Stats Function Reference
Stats
The stats (statistics) daemon is a simple daemon for maintaining statistics for jobs that are distributed across a number of processes where stats cannot be maintained in a single daemon like spamCtl etc. Statistics are maintained as integers in a hierarchal structure with named variables, grouped by a device name. Currently, statistics counts are assumed to always increase in value. Stats daemon has three commands: STATPUT, STATGET, and STATDEL. Variables may be added or changed using the infCtl tool. An access method is available via sttAcc.c (see sttXxx() calls below). #include "stat.h' should be used to access this daemon. You cannot use a COLON or an EQUAL sign in device names or variable names. Device names and variable names are limited to 31 characters (if you can't get it done in thirty one, think terse).
There are two copies of each variable, the current value and an array representing changes in the value for each minute of a 24 hour day (1440 minutes). Only non-zero minute values are returned on a query.
| | |
|
int
|
sttPut( char* devNam, char* devDat )
|
Put the listed variable names and values to the specified device name.
| | |
|
int
|
sttDel( char* devNam )
|
Delete the named variable on the named device.
| | |
|
int
|
sttGet( char* devNam )
|
Retrieve all variables from device DevNam. They will be returned as a string of comma separated fields. Each field will contain "varNam1=Val1".
| | |
|
int
|
sttGetRates( char* devNam )
|
Retrieve all rates from the device "DevNam". They will be returned as a string of comma separated variables.