1PMGETINDOMARCHIVE(3)       Library Functions Manual       PMGETINDOMARCHIVE(3)
2
3
4

NAME

6       pmGetInDomArchive  - get instance identifiers for a performance metrics
7       instance domain
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11
12       int pmGetInDomArchive(pmInDom indom, int **instlist, char ***namelist);
13
14       cc ... -lpcp
15

DESCRIPTION

17       Provided the current Performance Metrics Application Programming Inter‐
18       face  (PMAPI)  context is associated with a set of archives, pmGetInDo‐
19       mArchive will scan the union of all the instance  domain  metadata  for
20       the  instance  domain  indom,  and return via instlist the internal in‐
21       stance identifiers for all instances, and via namelist the full  exter‐
22       nal identifiers for all instances.
23
24       This routine is a specialized version of the more general PMAPI routine
25       pmGetInDom.
26
27       The number of instances found is returned as the function  value  (else
28       less than zero to indicate an error).
29
30       The  value  for the instance domain indom is typically extracted from a
31       pmDesc structure, following a call to pmLookupDesc(3) for a  particular
32       performance metric.
33
34       The  resulting  lists  of instance identifiers (instlist and namelist),
35       and the names that the elements of namelist point to,  will  have  been
36       allocated  by  pmGetInDomArchive with two calls to malloc(3), and it is
37       the responsibility of the caller to free(instlist)  and  free(namelist)
38       to release the space when it is no longer required.
39
40       When  the  result  of pmGetInDomArchive is less than one, both instlist
41       and namelist are undefined (no space will have been allocated,  and  so
42       calling free(3) is a singularly bad idea).
43

DIAGNOSTICS

45       PM_ERR_NOTARCHIVE
46              the  current  PMAPI  context is not associated with a set of ar‐
47              chives
48
49       PM_ERR_INDOM_LOG
50              indom is not a defined instance domain identifier for the set of
51              archives
52

PCP ENVIRONMENT

54       Environment variables with the prefix PCP_ are used to parameterize the
55       file and directory names used by PCP.  On each installation,  the  file
56       /etc/pcp.conf  contains  the  local  values  for  these variables.  The
57       $PCP_CONF variable may be used to specify an alternative  configuration
58       file,  as  described in pcp.conf(5).  Values for these variables may be
59       obtained programmatically using the pmGetConfig(3) function.
60

SEE ALSO

62       PMAPI(3), pmGetConfig(3), pmGetInDom(3), pmLookupDesc(3), pmLookupInDo‐
63       mArchive(3), pmNameInDomArchive(3), pcp.conf(5) and pcp.env(5).
64
65
66
67Performance Co-Pilot                  PCP                 PMGETINDOMARCHIVE(3)
Impressum