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

NAME

6       pmLoadASCIINameSpace - establish a local PMNS for an application
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       int pmLoadASCIINameSpace(const char *filename, int dupok);
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 pmLoadASCIINameSpace or pmLoadNameSpace(3).  If the applica‐
19       tion wants 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 pmLoadASCI‐
25       INameSpace.
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  un‐
32       less  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       pmLoadASCIINameSpace  is  a  variant of pmLoadNameSpace(3) in which the
37       dupok argument may be used to control the handling of multiple names in
38       the  PMNS that may be associated with a single Performance Metric Iden‐
39       tifier (PMID).  A value of 0 disallows duplicates, any other value  al‐
40       lows duplicates and the latter is the default behaviour of pmLoadNameS‐
41       pace(3) as of Version 3.10.3 of PCP.
42
43       The other difference is that  when  pmLoadASCIINameSpace  is  used  and
44       filename  is  not  PM_NS_DEFAULT, the PMNS file will always be pre-pro‐
45       cessed with pmcpp(1) as described in PMNS(5).  This allows a PMNS  file
46       that  contains  C-style comments, pre-processor directives or macros to
47       be processed correctly before the PMNS is parsed.
48
49       pmLoadASCIINameSpace returns zero on success.
50

DIAGNOSTICS

52       Syntax and other errors in the parsing of  the  PMNS  are  reported  on
53       stderr with a message of the form ``Error Parsing ASCII PMNS: ...''.
54
55       PM_ERR_DUPPMNS
56
57              It is an error to try to load more than one PMNS, or to call ei‐
58              ther pmLoadASCIINameSpace and/or  pmLoadNameSpace(3)  more  than
59              once.
60
61       PM_ERR_PMNS
62
63              Syntax error in an ASCII format PMNS.
64

FILES

66       $PCP_VAR_DIR/pmns/root   the  default  local PMNS, when the environment
67                                variable PMNS_DEFAULT is unset
68

PCP ENVIRONMENT

70       Environment variables with the prefix PCP_ are used to parameterize the
71       file  and  directory names used by PCP.  On each installation, the file
72       /etc/pcp.conf contains the  local  values  for  these  variables.   The
73       $PCP_CONF  variable may be used to specify an alternative configuration
74       file, as described in pcp.conf(5).  Values for these variables  may  be
75       obtained programmatically using the pmGetConfig(3) function.
76

SEE ALSO

78       PMAPI(3),   pmGetConfig(3),   pmLoadNameSpace(3),   pmTrimNameSpace(3),
79       pcp.conf(5), pcp.env(5) and PMNS(5).
80
81
82
83Performance Co-Pilot                  PCP              PMLOADASCIINAMESPACE(3)
Impressum