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       The  filename  argument  designates the PMNS of interest.  For applica‐
23       tions not requiring a tailored PMNS, the  special  value  PM_NS_DEFAULT
24       may be used for filename, to force the default local PMNS to be loaded.
25
26       The  default  local  PMNS  is  found in the file $PCP_VAR_DIR/pmns/root
27       unless the environment variable PMNS_DEFAULT is set, in which case  the
28       value  is assumed to be the pathname to the file containing the default
29       local PMNS.
30
31       Externally a PMNS may be stored in either an ASCII format or  a  binary
32       format.   The  utility  pmnscomp(1) is used to create the binary format
33       from the ASCII format described in pmns(4).
34
35       If the binary format is used, no checking is performed for aliasing  in
36       which  multiple  names in the PMNS are associated with a single Perfor‐
37       mance Metrics Identifier (PMID).  If the ASCII format is  to  be  used,
38       duplicate  PMIDs are not allowed, although pmLoadASCIINameSpace(3) pro‐
39       vides an alternative interface with user-defined control over the  pro‐
40       cessing of duplicate PMIDs in an ASCII format PMNS.
41
42       pmLoadNameSpace  attempts to load the PMNS by trying the following com‐
43       binations in order,
44
45       1. Binary format from the file filename.bin
46
47       2. Binary format from the file filename
48
49       3. ASCII format from the file filename
50

pmLoadNameSpace returns zero on success.

52

FILES

54       $PCP_VAR_DIR/pmns/root   the default local PMNS, when  the  environment
55                                variable PMNS_DEFAULT is unset
56

PCP ENVIRONMENT

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

SEE ALSO

66       pmnscomp(1), PMAPI(3), pmGetConfig(3), pmLoadASCIINameSpace(3), pmTrim‐
67       NameSpace(3), pcp.conf(4), pcp.env(4) and pmns(4).
68

DIAGNOSTICS

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