File: pmval.1

package info (click to toggle)
pcp 6.3.8-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 235,180 kB
  • sloc: ansic: 1,253,622; sh: 173,998; xml: 160,490; cpp: 83,331; python: 20,482; perl: 18,302; yacc: 6,886; makefile: 2,955; lex: 2,862; fortran: 60; java: 52
file content (520 lines) | stat: -rw-r--r-- 13,583 bytes parent folder | download
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
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
'\"! tbl | mmdoc
'\"macro stdmacro
.\"
.\" Copyright (c) 2015-2018,2022 Red Hat.
.\" 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,
\f3pmevent\f1 \- arbitrary performance metrics value dumper
.SH SYNOPSIS
\f3pmval\f1
[\f3\-dgLrvVXz?\f1]
[\f3\-a\f1 \f2archive\f1]
[\f3\-A\f1 \f2align\f1]
[\f3\-\-container\f1=\f2name\f1]
[\f3\-\-derived\f1=\f2file\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 \f2samples\f1]
[\f3\-S\f1 \f2starttime\f1]
[\f3\-t\f1 \f2interval\f1]
[\f3\-T\f1 \f2endtime\f1]
[\f3\-U\f1 \f2archive\f1]
[\f3\-w\f1 \f2width\f1]
[\f3\-x\f1 \f2pattern\f1]
[\f3\-Z\f1 \f2timezone\f1]
\f2metricname\f1
.sp
\f3pmevent\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 a set of archives 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 a set of archives,
.B pmval
may relinquish its own timing control, and operate under the control of a
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 client 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 output from
.B pmval
is directed to standard output.
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
.B pmevent
is an alias for
.BR pmval .
.SH OPTIONS
The available command line options are:
.TP 5
\fB\-a\fR \fIarchive\fR, \fB\-\-archive\fR=\fIarchive\fR
Performance metric values are retrieved from the set of Performance
Co-Pilot (PCP) archive files identified by the
.I archive
argument, which is a comma-separated list of names,
each of which may be the base name of an archive or the name of
a directory containing one or more archives.
See also
.BR \-U .
.TP
\fB\-A\fR \fIalign\fR, \fB\-\-align\fR=\fIalign\fR
Force the initial sample to be
aligned on the boundary of a natural time unit
.IR align .
Refer to
.BR PCPIntro (1)
for a complete description of the syntax for
.IR align .
.TP
\fB\-\-container\fR=\fIcontainer\fR
Specify an individual
.I container
to be queried.
.TP
\fB\-d\fR, \fB\-\-delay\fR
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
\fB\-\-derived\fR=\fIfile\fR
Load derived metric definitions from
.IR file .
.TP
\fB\-f\fR \fIprecision\fR, \fB\-\-precision\fR=\fIprecision\fR
Numbers are reported in ``fixed point'' notation, rather than the default
scientific notation, using
.IR precision
digits for precision.
Each number will be up to the column width determined by
the default heuristics, else the
.B \-w
option if specified, and include
.I precision
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 precision
omits the decimal point and any fractional digits.
.TP
\fB\-g\fR, \fB\-\-guimode\fR
Start
.B pmval
as the sole client of a new
.BR pmtime (1)
server process for replay of archived performance data using the
.BR pmtime (1)
graphical user interface.
.TP
\fB\-h\fR \fIhost\fR, \fB\-\-host\fR=\fIhost\fR
Fetch performance metrics from
.BR pmcd (1)
on
.IR host ,
rather than from the default localhost.
.TP
\fB\-i\fR \fIinstances\fR, \fB\-\-instances\fR=\fIinstances\fR
Specify a list of one or more names of
.I instances
for the nominated performance metric \- just these
.I 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
\fB\-K\fR \fIspec\fR, \fB\-\-spec\-local\fR=\fIspec\fR
When fetching metrics from a local context (see
.BR \-L ),
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
\fB\-L\fR, \fB\-\-local\-PMDA\fR
Use a local context to collect metrics from DSO PMDAs on the local host
without PMCD.
See also
.BR \-K .
.TP
\fB\-n\fR \fIpmnsfile\fR, \fB\-\-namespace\fR=\fIpmnsfile\fR
Load an alternative Performance Metrics Name Space
.RB ( PMNS (5))
from the file
.IR pmnsfile .
.TP
\fB\-O\fR \fIorigin\fR, \fB\-\-origin\fR=\fIorigin\fR
When reporting archived metrics, start reporting at
.I origin
within the time window (see
.B \-S
and
.BR \-T ).
Refer to
.BR PCPIntro (1)
for a complete description of the syntax for
.IR origin .
.TP
\fB\-p\fR \fIport\fR, \fB\-\-guiport\fR=\fIport\fR
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
\fB\-r\fR, \fB\-\-raw\fR
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
\fB\-s\fR \fIsamples\fR, \fB\-\-samples\fR=\fIsamples\fR
The
.I samples
argument 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 set of PCP archives (in archive mode).
.TP
\fB\-S\fR \fIstarttime\fR, \fB\-\-start\fR=\fIstarttime\fR
When reporting archived metrics, the report will be restricted to those
records logged at or after
.IR starttime .
Refer to
.BR PCPIntro (1)
for a complete description of the syntax for
.IR starttime .
.TP
\fB\-t\fR \fIinterval\fR, \fB\-\-interval\fR=\fIinterval\fR
Set the reporting
.I interval
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
\fB\-T\fR \fIendtime\fR, \fB\-\-finish\fR=\fIendtime\fR
When reporting archived metrics, the report will be restricted to those
records logged before or at
.IR endtime .
Refer to
.BR PCPIntro (1)
for a complete description of the syntax for
.IR endtime .
.TP
\fB\-U\fR \fIarchive\fR, \fB\-\-nointerp\fR=\fIarchive\fR
Performance metric values are retrieved from the Performance Co-Pilot (PCP)
.IR archive .
The argument is a comma-separated list of names, each
of which may be the base name of an archive or the name of a directory containing
one or more archives.
However, 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.
See also
.BR \-a .
.RS +5n
.PP
At most one of the options
.B \-a
and
.B \-U
may be specified.
.RE
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Enable verbose mode.
.TP
\fB\-V\fR, \fB\-\-version\fR
Display version number and exit.
.TP
\fB\-w\fR \fIwidth\fR, \fB\-\-width\fR=\fIwidth\fR
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
\fB\-x\fR \fIpattern\fR, \fB\-\-filter\fR=\fIpattern\fR
The given
.I pattern
is sent to the performance metric domain agent for the requested
.I metricname
before any values are requested.
This serves two purposes.
Firstly, it provides a mechanism for server-side event filtering
that is customisable for individual event streams.
In addition, some performance metrics domain agents also use the
PMCD store mechanism to provide a basic security model (e.g. for
sensitive log files, only a client host with
.BR pmStore (3)
access would be able to access the event stream).
.RS
.PP
As
.I pattern
may be processed by
.BR regcomp (3)
it should be a non-empty string.
Use . (dot) for a \(lqmatch all\(rq
.IR pattern .
.RE
.TP
\fB\-X\fR, \fB\-\-timestamp\fR
When replaying from an archive, this option requests that the
timestamp be reported with additional date information and increased
precision (microseconds with a single \fB\-X\fR, nanoseconds with an
additional \fB\-X\fR), for example
.B "Sat\ May\ 22\ 20:32:20.971633\ 2021"
instead of the default format, for example
.BR "20:32:20.971" .
.TP
\fB\-z\fR, \fB\-\-hostzone\fR
Use the local timezone of the host that is the source of the
performance metrics, as identified by either the
.B \-h
or the
.B \-a
or the
.B \-U
options.
The default is to use the timezone of the local host.
.TP
\fB\-Z\fR \fItimezone\fR, \fB\-\-timezone\fR=\fItimezone\fR
Use
.I timezone
for the date and time.
.I Timezone
is in the format of the environment variable
.B TZ
as described in
.BR environ (7).
.TP
\fB\-?\fR, \fB\-\-help\fR
Display usage message and exit.
.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(CR) | 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
.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).
.PP
For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3).
.SH SEE ALSO
.BR PCPIntro (1),
.BR pmcd (1),
.BR pmchart (1),
.BR pmdumptext (1),
.BR pminfo (1),
.BR pmlogdump (1),
.BR pmlogger (1),
.BR pmrep (1),
.BR pmtime (1),
.BR PMAPI (3),
.BR pmSpecLocalPMDA (3),
.BR pmStore (3),
.BR pcp.conf (5),
.BR pcp.env (5)
and
.BR PMNS (5).

.\" control lines for scripts/man-spell
.\" +ok+ sp {from .sp in troff macro defn} thathost