summaryrefslogtreecommitdiff
path: root/man/man1/pmnsmerge.1
blob: f1d02535ff3acf010586f8a7c4e5e89db51e9e01 (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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
'\"macro stdmacro
.\"
.\" Copyright (c) 2000-2004 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 PMNSMERGE 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmnsmerge\f1 \- merge multiple versions of a Performance Co-Pilot PMNS
.SH SYNOPSIS
.B $PCP_BINADM_DIR/pmnsmerge
[\f3\-adfv\f1]
.I infile
[...]
.I outfile
.SH DESCRIPTION
.B pmnsmerge
merges multiple instances of a
Performance Metrics Name Space (PMNS),
as used by the components of the
Performance Co-Pilot (PCP).
.P
Each
.I infile
argument names a file that includes the root of a PMNS, of the form
.P
.sp 0.5v
.in +1i
.ft CW
.nf
root {
    /* arbitrary stuff */
}
.fi
.ft 1
.in -1i
.sp 0.5v
.P
The order in which the
.I infile
files are processed is determined by the presence or absence of
embedded control lines of the form
.ft CW
#define _DATESTAMP \f(COYYYYMMDD\fP
.ft 1
.P
Files without a control line are processed first and in the
order they appear on the command line.
The other files are then processed in order of ascending
\f(CW_DATESTAMP\fP.
.P
The
.B \-a
option suppresses the argument re-ordering and processes all files
in the order they appear on the command line.
.P
The merging proceeds by matching names in PMNS, only those
\fBnew\fP names in each PMNS are considered, and these are
added after any existing metrics with the longest possible
matching prefix in their names.
For example, merging these two input PMNS
.P
.sp 0.5v
.in +1i
.ft CW
.nf
root {                    root {
                              surprise  1:1:3
    mine       1:1:1          mine      1:1:1
    foo                       foo
                              yawn
    yours      1:1:2 
}                         }
foo {                     foo {
    fumble     1:2:1
                              mumble    1:2:3
    stumble    1:2:2          stumble   1:2:2
}                         }
                          yawn {
                              sleepy    1:3:1
                          }
.fi
.ft 1
.in -1i
.P
Produces the resulting PMNS in
.IR out .
.P
.sp 0.5v
.in +1i
.ft CW
.nf
root {
    mine      1:1:1
    foo
    yours     1:1:2 
    surprise  1:1:3
    yawn
}
foo {
    fumble    1:2:1
    stumble   1:2:2
    mumble    1:2:3
}
yawn {
    sleepy    1:3:1
}
.fi
.ft 1
.P
To avoid accidental over-writing of PMNS files,
.I outfile
is expected to not exist when
.B pmnsmerge
starts.
The
.B \-f
option forces the removal of
.I outfile
(if it exists), before the check is made.
.PP
The
.B \-d
option allows the resultant PMNS to optionally contain
duplicate PMIDs with different names in the PMNS.  By default
this condition is considered an error.
.PP
The
.B \-v
option produces one line of diagnostic output as each
.I infile
is processed.
.PP
Once all of the merging has been completed,
.B pmnsmerge
will attempt to load
the resultant namespace using
.BR pmLoadASCIINameSpace (3)
\- if this fails for any reason,
.I outfile
will still be created, but
.B pmnsmerge
will report the problem and exit with non-zero status.
.SH CAVEAT
Once the writing of the new
.I outfile
file has begun, the signals SIGINT, SIGHUP and SIGTERM will be ignored
to protect the integrity of the new file.
.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).
.SH SEE ALSO
.BR pmnsadd (1),
.BR pmnsdel (1),
.BR pmLoadASCIINameSpace (3),
.BR pcp.conf (5),
.BR pcp.env (5)
and
.BR pmns (5).