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

NAME

6       pmNameInDomArchive  - translate an instance identifier into an instance
7       name
8

C SYNOPSIS

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

DESCRIPTION

17       Provided that the current Performance Metrics  Application  Programming
18       Interface  (PMAPI)  context  is  associated with a set of archive logs,
19       pmNameInDomArchive will scan the union of all the instance domain meta‐
20       data  for the instance domain indom, locate the first instance with the
21       internal instance identifier given by inst, and return the full  exter‐
22       nal instance identification via name.
23
24       This routine is a specialized version of the more general PMAPI routine
25       pmNameInDom.
26
27       The value for the instance domain indom is typically extracted  from  a
28       pmDesc  structure, following a call to pmLookupDesc(3) for a particular
29       performance metric.
30
31       The space for the value of name will have been allocated in pmNameInDo‐
32       mArchive  with malloc(3), and it is the responsibility of the caller to
33       free(3) the space when it is no longer required.
34
35       pmNameInDomArchive returns zero on success.
36

SEE ALSO

38       PMAPI(3),    pmGetConfig(3),    pmGetInDomArchive(3),     pmLookupInDo‐
39       mArchive(3), pmNameInDom(3), pcp.conf(5) and pcp.env(5).
40

DIAGNOSTICS

42       PM_ERR_NOTARCHIVE
43              the  current  PMAPI  context is not associated with a set of ar‐
44              chive logs
45
46       PM_ERR_INDOM_LOG
47              indom is not a defined instance domain identifier for the set of
48              archive logs
49
50       PM_ERR_INST_LOG
51              the  instance  identifier  inst  is  not  known for the instance
52              domain indom in the set of archive logs
53
54
55
56Performance Co-Pilot                  PCP                PMNAMEINDOMARCHIVE(3)
Impressum