Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pmgetindom(3) [centos man page]

PMGETINDOM(3)						     Library Functions Manual						     PMGETINDOM(3)

NAME
pmGetInDom - get instance identifiers for a performance metrics instance domain C SYNOPSIS
#include <pcp/pmapi.h> int pmGetInDom(pmInDom indom, int **instlist, char ***namelist); cc ... -lpcp DESCRIPTION
In the current Performance Metrics Application Programming Interface (PMAPI) context, locate the description of the instance domain indom, and return via instlist the internal instance identifiers for all instances, and via namelist the full external identifiers for all instances. The number of instances found is returned as the function value (else less than zero to indicate an error). The value for the instance domain indom is typically extracted from a pmDesc structure, following a call to pmLookupDesc(3) for a particu- lar performance metric. The resulting lists of instance identifiers (instlist and namelist), and the names that the elements of namelist point to, will have been allocated by pmGetInDom with two calls to malloc(3C), and it is the responsibility of the caller to free(instlist) and free(namelist) to release the space when it is no longer required. When the result of pmGetInDom is less than one, both instlist and namelist are undefined (no space will have been allocated, and so calling free(3C) is a singularly bad idea). PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configura- tion file, as described in pcp.conf(5). Values for these variables may be obtained programmatically using the pmGetConfig(3) function. SEE ALSO
PMAPI(3), pmGetConfig(3), pmGetInDomArchive(3), pmLookupDesc(3), pmLookupInDom(3), pmNameInDom(3), pcp.conf(5) and pcp.env(5). DIAGNOSTICS
PM_ERR_INDOM indom is not a valid instance domain identifier Performance Co-Pilot PCP PMGETINDOM(3)

Check Out this Related Man Page

PMIADDINSTANCE(3)					     Library Functions Manual						 PMIADDINSTANCE(3)

NAME
pmiAddInstance - add an element to an instance domain in a LOGIMPORT context C SYNOPSIS
#include <pcp/pmapi.h> #include <pcp/impl.h> #include <pcp/import.h> int pmiAddInstance(pmInDom indom, const char *instance, int inst); cc ... -lpcp_import -lpcp Perl SYNOPSIS use PCP::LogImport; pmiAddInstance($indom, $instance, $inst); DESCRIPTION
As part of the Performance Co-Pilot Log Import API (see LOGIMPORT(3)), pmiAddInstance adds a new element to the instance domain identified by indom. indom would normally be constructed using the pmInDom_build macro, e.g. pmInDom_build(PMI_DOMAIN,0) for the first instance domain in the Performance Metrics Domain PMI_DOMAIN (which is the default for all meta data created by the LOGIMPORT library). The new instance must have both an external name (instance) and an internal instance identifier (inst) that is unique across all instances in the indom instance domain. There is a special ``uniqueness rule'' for instance that is imposed by pmLookupInDom(3), namely that the external instance name must be unique in the leading non-space characters, e.g. the instance names ``foo'' and ``foo bar'' are considered the same by this rule and not allowed in the same instance domain, but ``foo'' and ``foobar'' would be allowed. Once defined, the external instance name can be used in calls to pmiGetHandle(3) and/or pmiPutValue(3) with the name of a metric defined over the same instance domain. DIAGNOSTICS
pmiAddInstance returns zero on success else a negative value that can be turned into an error message by calling pmiErrStr(3). SEE ALSO
LOGIMPORT(3), pmiAddMetric(3), pmiErrStr(3), pmiGetHandle(3), pmiPutValue(3) and pmLookupInDom(3). Performance Co-Pilot PMIADDINSTANCE(3)
Man Page