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 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
|
'\"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\-adfxv\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
.sp 0.5v
.P
.in +1i
.ft CR
.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
.P
.ft CR
#define _DATESTAMP \f(CIYYYYMMDD\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(CR_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
.sp 0.5v
.P
.in +1i
.ft CR
.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 .
.sp 0.5v
.P
.in +1i
.ft CR
.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 allows an existing
.I outfile
to be unlinked (if possible) and truncated before writing starts.
.PP
Normally
duplicate names for the same Performance Metric Identifier (PMID) in
a PMNS are allowed.
The
.B \-d
option is the default option and is included for backwards compatibility.
The
.B \-x
option reverses the default and
.B pmnsmerge
will report an error and exit with a non-zero status if a duplicate
name is found for a PMID in any of the
.I input
PMNS files or in the merged
.I output
PMNS.
.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.
.PP
Using
.B pmnsmerge
with a single
.I input
argument allows that PMNS file to be checked.
In addition to
syntactic checking, specifying
.B \-x
will also enable a check for duplicate names for all PMIDs.
.SH OPTIONS
The available command line options are:
.TP 5
\fB\-a\fR
Process files in command line order.
.TP
\fB\-d\fR, \fB\-\-dupok\fR
Allow duplicate metric names per PMID.
This is the default.
.TP
\fB\-f\fR, \fB\-\-force\fR
Overwrite output file if it already exists.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Verbose input processing.
.TP
\fB\-x\fR, \fB\-\-nodups\fR
Do not allow duplicate metric names per PMID.
.TP
\fB\-?\fR, \fB\-\-help\fR
Display usage message and exit.
.SH CAVEATS
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 \fBPCP_\fP are used to parameterize
the file and directory names used by PCP.
On each installation, the
file \fI/etc/pcp.conf\fP contains the local values for these variables.
The \fB$PCP_CONF\fP variable may be used to specify an alternative
configuration file, as described in \fBpcp.conf\fP(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).
.\" control lines for scripts/man-spell
.\" +ok+ _DATESTAMP
|