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

NAME

6       pmLoadNameSpace - load a local PMNS for an application
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       int pmLoadNameSpace(const char *filename);
12
13       cc ... -lpcp
14

DESCRIPTION

16       If  the  application  wants  to force using a local Performance Metrics
17       Name Space (PMNS) instead of a distributed PMNS then it must  load  the
18       PMNS using pmLoadNameSpace or pmLoadASCIINameSpace(3).  If the applica‐
19       tion is to use a distributed PMNS, then it should NOT make  a  call  to
20       load the PMNS explicitly.
21
22       Most  applications  using a Performance Metrics Application Programming
23       Interface (PMAPI) context (of any type, so PM_CONTEXT_HOST  or  PM_CON‐
24       TEXT_ARCHIVE  or PM_CONTEXT_LOCAL) should not need to call pmLoadNameS‐
25       pace.
26
27       The filename argument designates the PMNS of  interest.   For  applica‐
28       tions  not  requiring  a tailored PMNS, the special value PM_NS_DEFAULT
29       may be used for filename, to force the default local PMNS to be loaded.
30
31       The default local PMNS is  found  in  the  file  $PCP_VAR_DIR/pmns/root
32       unless  the environment variable PMNS_DEFAULT is set, in which case the
33       value is assumed to be the pathname to the file containing the  default
34       local PMNS.
35
36       Externally a PMNS is stored in an ASCII format as described in pmns(5).
37       However, note that pmLoadNameSpace assumes filename  does  not  contain
38       any  C-style  comments,  pre-processor directives or macros; if this is
39       not the case, pmLoadASCIINameSpace(3) should be used instead.
40
41       As of Version 3.10.3 of PCP, by default, multiple names in the PMNS are
42       allowed  to  be associated with a single Performance Metrics Identifier
43       (PMID) and this is unconditionally allowed by pmLoadNameSpace.  pmLoad‐
44       ASCIINameSpace(3)  provides  an alternative interface with user-defined
45       control over the handling of duplicate names for the same PMID  in  the
46       PMNS.
47
48       pmLoadNameSpace returns zero on success.
49

FILES

51       $PCP_VAR_DIR/pmns/root   the  default  local PMNS, when the environment
52                                variable PMNS_DEFAULT is unset
53

PCP ENVIRONMENT

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

SEE ALSO

63       PMAPI(3),  pmGetConfig(3), pmLoadASCIINameSpace(3), pmTrimNameSpace(3),
64       pcp.conf(5), pcp.env(5) and pmns(5).
65

DIAGNOSTICS

67       Syntax and other errors in the parsing of  the  PMNS  are  reported  on
68       stderr with a message of the form ``Error Parsing ASCII PMNS: ...''.
69
70       PM_ERR_DUPPMNS
71
72              It  is  an  error to try and load more than one PMNS, or to call
73              either pmLoadNameSpace and/or pmLoadASCIINameSpace(3) more  than
74              once.
75
76       PM_ERR_PMNS
77
78              Syntax error in the PMNS file.
79
80
81
82Performance Co-Pilot                  PCP                   PMLOADNAMESPACE(3)
Impressum