summaryrefslogtreecommitdiff
path: root/man/man3/pmloadasciinamespace.3
blob: a2778edd63ad62efcac489de40be5758f0e3e041 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
'\"macro stdmacro
.\"
.\" Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
.\" 
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\" 
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\" 
.\"
.TH PMLOADASCIINAMESPACE 3 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmLoadASCIINameSpace\f1 \- establish a local PMNS for an application
.SH "C SYNOPSIS"
.ft 3
#include <pcp/pmapi.h>
.sp
int pmLoadASCIINameSpace(const char *\fIfilename\fP, int \fIdupok\fP);
.sp
cc ... \-lpcp
.ft 1
.SH DESCRIPTION
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
.B pmLoadASCIINameSpace
or
.BR pmLoadNameSpace (3).
If the application wants to use a distributed PMNS, then it should NOT
make a call to load the PMNS explicitly.
.PP
.B pmLoadASCIINameSpace
is a variant of
.BR pmLoadNameSpace (3)
in which the
.I 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.
.PP
The
.I filename
argument designates the PMNS of interest.
For applications not requiring a tailored PMNS,
the special value
.B PM_NS_DEFAULT
may be 
used for
.IR filename ,
to force the default local PMNS to be loaded.
.PP
The default local PMNS is found in the file
.I $PCP_VAR_DIR/pmns/root
unless the environment variable
.B PMNS_DEFAULT
is set, in which case the value is assumed to be the pathname
to the file containing the default local PMNS.
.PP
.B pmLoadASCIINameSpace
returns zero on success.
.SH FILES
.IP \f2$PCP_VAR_DIR/pmns/root\f1 2.5i
the default local PMNS, when the environment variable
.B PMNS_DEFAULT
is unset
.RE
.SH "PCP ENVIRONMENT"
Environment variables with the prefix
.B PCP_
are used to parameterize the file and directory names
used by PCP.
On each installation, the file
.I /etc/pcp.conf
contains the local values for these variables.
The
.B $PCP_CONF
variable may be used to specify an alternative
configuration file,
as described in
.BR pcp.conf (5).
Values for these variables may be obtained programmatically
using the
.IR pmGetConfig (3)
function.
.SH SEE ALSO
.BR PMAPI (3),
.BR pmGetConfig (3),
.BR pmLoadNameSpace (3),
.BR pmTrimNameSpace (3),
.BR pcp.conf (5),
.BR pcp.env (5)
and
.BR pmns (5).
.SH DIAGNOSTICS
Syntax and other errors in the parsing of the PMNS are reported
on
.I stderr
with a message of the form ``Error Parsing ASCII PMNS: ...''.
.PP
.B PM_ERR_DUPPMNS
.IP
It is an error to try to load more than one PMNS, or to call
either
.B pmLoadASCIINameSpace
and/or
.BR pmLoadNameSpace (3)
more than once.
.PP
.B PM_ERR_PMNS
.IP
Syntax error in an ASCII format PMNS.