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

PMADDPROFILE(3) 					     Library Functions Manual						   PMADDPROFILE(3)

NAME
pmAddProfile - add instance(s) to the current PMAPI instance profile C SYNOPSIS
#include <pcp/pmapi.h> int pmAddProfile(pmInDom indom, int numinst, int *instlist); cc ... -lpcp DESCRIPTION
The set of instances for performance metrics returned from a pmFetch(3) call may be filtered or restricted using an instance profile. There is one instance profile for each context the application creates at the Performance Metrics Application Programming Interface (PMAPI(3)), and each instance profile may include instances from one or more instance domains (see pmLookupDesc(3)). pmAddProfile may be used to add new instance specifications to the instance profile of the current PMAPI context. In the simplest variant, the list of instances identified by the instlist argument for the indom instance domain are added to the instance profile. The list of instance identifiers contains numinst values. The indom value would normally be extracted from a call to pmLookupDesc(3) for a particular performance metric, and the instances in instlist would typically be determined by calls to pmGetInDom(3) or pmLookupInDom(3). To select all instances in all instance domains, use pmAddProfile(PM_INDOM_NULL, 0, (int *)0) This is the only case where indom may be equal to PM_INDOM_NULL. If numinst is zero, or instlist is NULL, then all instances in indom are selected. SEE ALSO
PMAPI(3), pmDelProfile(3), pmFetch(3), pmGetInDom(3), pmLookupDesc(3), pmLookupInDom(3), pmNewContext(3), pmUseContext(3) and pmWhichCon- text(3). DIAGNOSTICS
PM_ERR_PROFILESPEC indom was PM_INDOM_NULL and instlist was not empty CAVEAT
It is possible to add non-existent instance domains and non-existent instances to an instance profile. None of the routines that use the instance profile will ever issue an error if you do this. The cost of checking, when checking is possible, outweighs any benefits. Performance Co-Pilot PCP PMADDPROFILE(3)
Man Page