Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pmstore(3) [centos man page]

PMSTORE(3)						     Library Functions Manual							PMSTORE(3)

NAME
pmStore - modify values of performance metrics C SYNOPSIS
#include <pcp/pmapi.h> int pmStore(const pmResult *result); cc ... -lpcp DESCRIPTION
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 routine pmStore is a lightweight inverse of pmFetch(3). The caller must build the pmResult data structure (of course, this could have been returned from an earlier pmFetch(3) call) and then call pmStore. It is an error to pass a request to pmStore in which the numval field within any of the pmValueSet structure 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 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 is zero for success. SEE ALSO
PMAPI(3), pmFetch(3) and pmSetMode(3). DIAGNOSTICS
PM_ERR_GENERIC At least one of the modifications was rejected. No other status is available from below the PMAPI (this is the lightweight part of the functionality!). In cases where the outcome of pmStore for individual metrics is important, the caller should make one call to pmStore for each metric. On the other hand, a bulk modification can be performed in a single pmStore call for situations in which the outcome is not critical. PM_ERR_NOTHOST The current PMAPI context is an archive rather than a host, or it is a host that is not set to the current time, i.e. has been ``rewound'' to the recent past using pmSetMode(3). PM_ERR_TOOSMALL The number of metrics specified in result is less than one. PM_ERR_VALUE One or more of the pmValueSets in result has a numval field with a value less than one. Performance Co-Pilot PCP PMSTORE(3)

Check Out this Related Man Page

PMTRIMNAMESPACE(3)					     Library Functions Manual						PMTRIMNAMESPACE(3)

NAME
pmTrimNameSpace - prune a performance metrics name space C SYNOPSIS
#include <pcp/pmapi.h> int pmTrimNameSpace(void); cc ... -lpcp DESCRIPTION
If the current Performance Metrics Application Programming Interface (PMAPI) context corresponds to a version 1 archive log of Performance Co-Pilot (PCP) performance metrics (as collected by pmlogger(1) -V1), then the currently loaded Performance Metrics Name Space (PMNS), is trimmed to exclude metrics for which no description can be found in the archive. The PMNS is further trimmed to remove empty subtrees that do not contain any performance metric. Since PCP archives usually contain some subset of all metrics named in the default PMNS, pmTrimNameSpace effectively trims the applica- tion's PMNS to contain only the names of the metrics in the archive. Since PCP 2.0, pmTrimNameSpace is only needed for dealing with version 1 archives. Version 2 archives actually store the "trimmed" PMNS. Prior to any trimming, the PMNS is restored to the state as of the completion of the last pmLoadASCIINameSpace(3) or pmLoadNameSpace(3), so the effects of consecutive calls to pmTrimNameSpace with archive contexts are not additive. If the current PMAPI context corresponds to a host and a pmLoadASCIINameSpace(3) or pmLoadNameSpace(3) call was made, then the PMNS reverts to all names loaded into the PMNS at the completion of the last pmLoadASCIINameSpace(3) or pmLoadNameSpace(3), i.e. any trimming is undone. On success, pmTrimNameSpace returns zero. SEE ALSO
pmlogger(1), PMAPI(3), pmLoadASCIINameSpace(3), pmLoadNameSpace(3), pmNewContext(3) and pmns(5). DIAGNOSTICS
PM_ERR_NOPMNS you must have loaded a PMNS using pmLoadASCIINameSpace(3) or pmLoadNameSpace(3) before calling pmTrimNameSpace PM_ERR_NOCONTEXT the current PMAPI context is invalid Performance Co-Pilot PCP PMTRIMNAMESPACE(3)
Man Page