If the application wants to force using a local Performance Metrics Name Space (PMNS) instead of a
distributed PMNS then it must load the PMNS using pmLoadASCIINameSpace or pmLoadNameSpace(3). If the
application wants to use a distributed PMNS, then it should NOT make a call to load the PMNS explicitly.
Most applications using a Performance Metrics Application Programming Interface (PMAPI) context (of any
type, so PM_CONTEXT_HOST or PM_CONTEXT_ARCHIVE or PM_CONTEXT_LOCAL) should not need to call
pmLoadASCIINameSpace.
The filename argument designates the PMNS of interest. For applications not requiring a tailored PMNS,
the special value PM_NS_DEFAULT may be used for filename, to force the default local PMNS to be loaded.
The default local PMNS is found in the file $PCP_VAR_DIR/pmns/root unless the environment variable
PMNS_DEFAULT is set, in which case the value is assumed to be the pathname to the file containing the
default local PMNS.
pmLoadASCIINameSpace is a variant of pmLoadNameSpace(3) in which the dupok argument may be used to
control the handling of multiple names in the PMNS that may be associated with a single Performance
Metric Identifier (PMID). A value of 0 disallows duplicates, any other value allows duplicates and the
latter is the default behaviour of pmLoadNameSpace(3) as of Version 3.10.3 of PCP.
The other difference is that when pmLoadASCIINameSpace is used and filename is not PM_NS_DEFAULT, the
PMNS file will always be preprocessed with pmcpp(1) as described in PMNS(5). This allows a PMNS file
that contains C-style comments, preprocessor directives or macros to be processed correctly before the
PMNS is parsed.
pmLoadASCIINameSpace returns zero on success.