PMSTORE(3) | Library Functions Manual | PMSTORE(3) |
pmStore, pmStoreHighRes - modify values of performance metrics
#include <pcp/pmapi.h>
int pmStore(const pmResult *result);
int pmStoreHighRes(const pmHighResResult *result);
cc ... -lpcp
In some special cases it may be helpful to modify the current values of performance metrics, e.g. to reset a counter to zero, or to modify a ``metric'' which is a control variable for some agent collecting performance metrics.
The routines pmStore and pmStoreHighRes are lightweight inverses of pmFetch(3) and pmFetchHighRes(3) respectively.
The caller must build the result data structure (of course, this could have been returned from an earlier pmFetch(3) or pmFetchHighRes(3) call).
It is an error to pass a result to pmStore or pmStoreHighRes in which the numval field within any of the pmValueSet structures has a value less than one.
The current Performance Metrics Application Programming Interface (PMAPI) context must be one with a host as the source of metrics, and the current value of the nominated metrics will be changed, i.e. pmStore and pmStoreHighRes cannot be used to make retrospective changes to information in either the archive logs, or in the recent past for real-time sources of metrics.
The return code from pmStore and pmStoreHighRes is zero for success.
PMAPI(3), pmFetch(3), pmFetchHighRes(3), pmSetModeHighRes(3) and pmSetMode(3).
PCP | Performance Co-Pilot |