summaryrefslogtreecommitdiff
path: root/man/man1/pmval.1
blob: 7f06b36d2cf05a71949310d6396968a17e344d27 (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
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
'\"! tbl | mmdoc
'\"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 PMVAL 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmval\f1 \- performance metrics value dumper
.\" literals use .B or \f3
.\" arguments use .I or \f2
.SH SYNOPSIS
\f3pmval\f1
[\f3\-dgrz\f1]
[\f3\-A\f1 \f2align\f1]
[\f3\-a\f1 \f2archive\f1]
[\f3\-f\f1 \f2N\f1]
[\f3\-h\f1 \f2host\f1]
[\f3\-i\f1 \f2instances\f1]
[\f3\-K\f1 \f2spec\f1]
[\f3\-n\f1 \f2pmnsfile\f1]
[\f3\-O\f1 \f2offset\f1]
[\f3\-p\f1 \f2port\f1]
[\f3\-S\f1 \f2starttime\f1]
[\f3\-s\f1 \f2samples\f1]
[\f3\-T\f1 \f2endtime\f1]
[\f3\-t\f1 \f2interval\f1]
[\f3\-U\f1 \f2archive\f1]
[\f3\-w\f1 \f2width\f1]
[\f3\-Z\f1 \f2timezone\f1]
\f2metricname\f1
.SH DESCRIPTION
.de EX
.in +0.5i
.ie t .ft CB
.el .ft B
.ie t .sp .5v
.el .sp
.ta \\w' 'u*8
.nf
..
.de EE
.fi
.ie t .sp .5v
.el .sp
.ft R
.in
..
.B pmval
prints current or archived values for the nominated performance metric.
The metric of interest is named in the
.I metricname
argument, subject to instance qualification with the
.B \-i
flag as described below.
.PP
Unless directed to another host by the
.B \-h
option,
or to an archive by the
.B \-a
or
.B \-U
options,
.B pmval
will contact the Performance Metrics Collector Daemon (PMCD)
on the local host to obtain the required information.
.PP
The
.I metricname
argument may also be given in the metric specification syntax, as
described in
.BR PCPIntro (1),
where the source, metric and instance may all be included in the
.IR metricname ,
e.g. thathost:kernel.all.load["1 minute"].
When this format is used, none of the
.B \-h
or
.B \-a
or
.B \-U
options may be specified.
.PP
When using the metric specification syntax, the ``hostname''
.B @
is treated specially and
causes
.B pmval
to use a local context to collect metrics from PMDAs on the local host
without PMCD.  Only some metrics are available in this mode.
.PP
When processing an archive,
.B pmval
may relinquish its own timing control, and operate as a ``slave'' of
a
.BR pmtime (1)
process that uses a GUI dialog to provide timing control.
In this case, either the
.B \-g
option should be used to start
.B pmval
as the sole slave of a new
.BR pmtime (1)
instance, or
.B \-p
should be used to attach
.B pmval
to an existing
.BR pmtime (1)
instance via the IPC channel identified by the
.I port
argument.
.PP
The
.BR \-S ,
.BR \-T ,
.BR \-O
and
.B \-A
options may be used to define a time window to restrict the
samples retrieved, set an initial origin within the time window,
or specify a ``natural'' alignment of the sample times; refer to
.BR PCPIntro (1)
for a complete description of these options.
.PP
The other options which control the source, timing and layout of the information
reported by
.B pmval
are as follows:
.TP 5
.B \-a
Performance metric values are retrieved from the Performance Co-Pilot (PCP)
archive log file identified by the base name
.IR archive .
.TP
.B \-d
When replaying from an archive,
this option requests that the prevailing real-time delay be applied between
samples (see
.BR \-t )
to effect a pause, rather than the default behaviour of replaying at full speed.
.TP
.B \-f
Numbers are reported in ``fixed point'' notation, rather than the default
scientific notation.  Each number will be up to the column width determined by
the default heuristics, else the
.B \-w
option if specified, and include
.I N
digits after the decimal point.  So, the options
.B "\-f 3 \-w 8"
would produce numbers of the form 9999.999.
A value of zero for
.I N
omits the decimal point and any fractional digits.
.TP
.B \-g
Start
.B pmval
as the slave of a new
.BR pmtime (1)
process for replay of archived performance data using the
.BR pmtime (1)
graphical user interface.
.TP
.B \-h
Current performance metric values are retrieved from the nominated
.I host
machine.
.TP
.B \-i
.I instances
is a list of one or more
instance names for the nominated performance metric \- just these
instances will be retrieved and reported
(the default is to report all instances).
The list must be a single argument, with
elements of the list separated by commas and/or white space.
.RS
.PP
The instance name may be quoted with single (') or double (") quotes
for those cases where
the instance name contains white space or commas.
.PP
Multiple
.B \-i
options are allowed as an alternative way of specifying more than
one instance of interest.
.PP
As an example, the following are all equivalent:
.EX
$ pmval \-i "'1 minute','5 minute'" kernel.all.load
$ pmval \-i '"1 minute","5 minute"' kernel.all.load
$ pmval \-i "'1 minute' '5 minute'" kernel.all.load
$ pmval \-i "'1 minute'" \-i "'5 minute'" kernel.all.load
$ pmval 'localhost:kernel.all.load["1 minute","5 minute"]'
.EE
.RE
.TP
.B \-K
When
fetching metrics from a local context, the
.B \-K
option may be used to control the DSO PMDAs that should be
made accessible.  The
.I spec
argument conforms to the syntax described in
.BR __pmSpecLocalPMDA (3).
More than one
.B \-K
option may be used.
.TP
.B \-n
Normally
.B pmval
operates on the default Performance Metrics Name Space (PMNS), however
if the
.B \-n
option is specified an alternative namespace is loaded
from the file
.IR pmnsfile.
.TP
.B \-p
Attach
.B pmval
to an existing
.BR pmtime (1)
time control process instance via the IPC channel identified by the
\f2port\f1 argument.
This option is normally only used by other tools, e.g.
.BR pmchart (1),
when they launch
.B pmval
with synchronized time control.
.TP
.B \-r
Print raw values for cumulative counter metrics.  Normally cumulative counter
metrics are converted to rates.  For example, disk transfers are reported
as number of disk transfers per second during the preceding sample interval,
rather than the raw value of number of disk transfers since the machine was
booted.  If you specify this option, the raw metric values are printed.
.TP
.B \-s
The argument
.I samples
defines the number of samples to be retrieved and reported.
If
.I samples
is 0 or
.B \-s
is not specified, 
.B pmval
will sample and report continuously (in real time mode) or until the end
of the PCP archive (in archive mode).
.TP
.B \-t
The default update \f2interval\f1 may be set to something other than the
default 1 second.
The
.I interval
argument follows the syntax described in
.BR PCPIntro (1),
and in the simplest form may be an unsigned integer (the implied
units in this case are seconds).
.TP
.B \-U
Performance metric values are retrieved from the Performance Co-Pilot (PCP)
archive log file identified by the base name
.IR archive ,
although unlike
.B \-a
every recorded value in the archive for the selected metric
and instances is reported (so no interpolation mode, and the sample
interval (\c
.B \-t
option) is ignored.
.RS +5n
.PP
At most one of the options
.B \-a
and
.B \-U
may be specified.
.RE
.TP
.B \-w
Set the width of each column of output to be
.I width
columns.
If not specified columns are wide
enough to accommodate the largest value of the type being printed.
.TP
.B \-Z
By default,
.B pmval
reports the time of day according to the local timezone on the
system where
.B pmval
is run.
The
.B \-Z
option changes the timezone to
.I timezone
in the format of the environment variable
.B TZ
as described in
.BR environ (5).
.TP
.B \-z
Change the reporting timezone to the local timezone at the host that is
the source of the performance metrics, as identified via either the
.I metricname
or the
.B \-h
or
.B \-a
or
.B \-U
options.
.PP
The following symbols may occasionally appear, in place of a metric value, in
.B pmval
output:  A question mark symbol (?) indicates that a value is no
longer available for that metric instance.  An exclamation mark (!)
indicates that a 64-bit counter wrapped during the sample.
.PP
The output from
.B pmval
is directed to standard output.
.SH FILES
.PD 0
.TP 10
.BI $PCP_VAR_DIR/pmns/ *
default PMNS specification files
.PD
.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 PCPIntro (1),
.BR pmcd (1),
.BR pmchart (1),
.BR pmdumplog (1),
.BR pminfo (1),
.BR pmlogger (1),
.BR pmtime (1),
.BR PMAPI (3),
.BR __pmSpecLocalPMDA (3),
.BR pcp.conf (5)
and
.BR pcp.env (5).
.SH DIAGNOSTICS
All are generated on standard error and are intended to be self-explanatory.
.SH CAVEATS
By default,
.B pmval
attempts to display non-integer numeric values in a way that does not distort the
inherent precision (rarely more than 4 significant
digits), and tries to maintain a tabular format in
the output.  These goals are sometimes in conflict.
.PP
In the absence of the
.B \-f
option (described above),
the following table describes the formats used for different
ranges of numeric values for any metric that is of type
.B PM_TYPE_FLOAT
or
.BR PM_TYPE_DOUBLE ,
or any metric that has the semantics of a counter (for
which
.B pmval
reports the rate converted value):
.TS
box,center;
cf(R) | cf(R)
rf(CW) | lf(R).
Format	Value Range
_
!	No values available
9.999E-99	< 0.1
0.0\0\0\0	0
9.9999	> 0 and <= 0.9999
9.999\0	> 0.9999 and < 9.999
99.99\0\0	> 9.999 and < 99.99
999.9\0\0\0	> 99.99 and < 999.9
9999.\0\0\0\0	> 999.9 and < 9999
9.999E+99	> 9999
.TE