1PMLOADASCIINAMESPACE(3) Library Functions Manual PMLOADASCIINAMESPACE(3)
2
3
4
6 pmLoadASCIINameSpace - establish a local PMNS for an application
7
9 #include <pcp/pmapi.h>
10
11 int pmLoadASCIINameSpace(const char *filename, int dupok)
12
13 cc ... -lpcp
14
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 pmLoadASCIINameSpace is a variant of pmLoadNameSpace(3) which will only
23 process an ASCII format PMNS, and the dupok argument may be used to
24 control the handling of multiple names in the PMNS that may be associ‐
25 ated with a single Performance Metric Identifier (PMID). A value of 0
26 disallows duplicates, any other value allows duplicates.
27
28 The filename argument designates the PMNS of interest. For applica‐
29 tions not requiring a tailored PMNS, the special value PM_NS_DEFAULT
30 may be used for filename, to force the default local PMNS to be loaded;
31 although since the default local PMNS will exist in a binary format,
32 pmLoadNameSpace(3) would be the more efficient routine to use.
33
34 The default local PMNS is found in the file $PCP_VAR_DIR/pmns/root
35 unless the environment variable PMNS_DEFAULT is set, in which case the
36 value is assumed to be the pathname to the file containing the default
37 local PMNS.
38
39 pmLoadASCIINameSpace returns zero on success.
40
42 $PCP_VAR_DIR/pmns/root the default local PMNS, when the environment
43 variable PMNS_DEFAULT is unset
44
46 Environment variables with the prefix PCP_ are used to parameterize the
47 file and directory names used by PCP. On each installation, the file
48 /etc/pcp.conf contains the local values for these variables. The
49 $PCP_CONF variable may be used to specify an alternative configuration
50 file, as described in pcp.conf(4). Values for these variables may be
51 obtained programatically using the pmGetConfig(3) function.
52
54 pmnscomp(1), PMAPI(3), pmGetConfig(3), pmLoadNameSpace(3), pmTrimNameS‐
55 pace(3), pcp.conf(4), pcp.env(4) and pmns(4).
56
58 Syntax and other errors in the parsing of the PMNS are reported on
59 stderr with a message of the form ``Error Parsing ASCII PMNS: ...''.
60
61 PM_ERR_DUPPMNS
62
63 It is an error to try to load more than one PMNS, or to call
64 either pmLoadASCIINameSpace and/or pmLoadNameSpace(3) more than
65 once.
66
67 PM_ERR_PMNS
68
69 Syntax error in an ASCII format PMNS.
70
71
72
73Performance Co-Pilot SGI PMLOADASCIINAMESPACE(3)