Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pmdelprofile(3) [centos man page]

PMDELPROFILE(3) 					     Library Functions Manual						   PMDELPROFILE(3)

NAME
pmDelProfile - delete instance(s) from the current PMAPI instance profile C SYNOPSIS
#include <pcp/pmapi.h> int pmDelProfile(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), and each instance profile may include instances from one or more instance domains (see pmLookupDesc(3)). pmDelProfile may be used to delete instance specifications from 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 removed from 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). If indom equals PM_INDOM_NULL or numinst is zero, then all instance domains are selected for deletion. If instlist is NULL, then all instances in the selected domain(s) are removed from the profile. To disable all available instances in all domains, use pmDelProfile(PM_INDOM_NULL, 0, NULL). This is the only situation in which indom may be PM_INDOM_NULL. SEE ALSO
pmAddProfile(3), PMAPI(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 delete non-existent instance domains and non-existent instances from 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 PMDELPROFILE(3)

Check Out this Related Man Page

PMDAINSTANCE(3) 					     Library Functions Manual						   PMDAINSTANCE(3)

NAME
pmdaInstance - return instance descriptions for a PMDA C SYNOPSIS
#include <pcp/pmapi.h> #include <pcp/impl.h> #include <pcp/pmda.h> int pmdaInstance(pmInDom indom, int inst, char *name, __pmInResult **result, pmdaExt *pmda); cc ... -lpcp_pmda -lpcp DESCRIPTION
pmdaInstance uses the standard PMDA(3) data structures to return information concerning the instance domain indom. The result structure is constructed by pmdaInstance and will contain one or more instance names and/or identifiers as specified by the inst and name arguments. If inst has the value PM_IN_NULL and name is a null string, result will contain all the instances names and identifiers in the instance do- main. If inst is PM_IN_NULL but name is the name of an instance in the instance domain indom, then result will contain the instance identifier for instance name. Note that if name contains no spaces, partial matching up to the first space in the instance name is performed, i.e. ``1'' will match instance name ``1 minute''. If name contains an embedded space, then no partial matching is performed and name should match one of the instance names exactly. If name is a null string but inst is an instance identifier in the instance domain indom, then result will contain the name for instance inst. The result structure is allocated with malloc(3) and should be released by the caller with free(3). DIAGNOSTICS
If any errors occur during the execution of pmdaInstance, the result structure is deallocated. If the instance domain indom is not sup- ported by the PMDA, pmdaInstance will return PM_ERR_INDOM. If the inst or name does not correspond to any instances in the indom domain, pmdaInstance will return PM_ERR_INST. CAVEAT
The PMDA must be using PMDA_INTERFACE_2 or later, as specified in the call to pmdaDSO(3) or pmdaDaemon(3). Because of optional partial matching up to the first space in the instance name, the PMDA developer should ensure that if instance names are allowed to have spaces, the names are unique up to the first space. SEE ALSO
malloc(3), PMAPI(3), PMDA(3) and pmGetInDom(3). Performance Co-Pilot PCP PMDAINSTANCE(3)
Man Page