summaryrefslogtreecommitdiff
path: root/man/man1/pcp.1
blob: 3c6d7e477060505d1b94f5ec58f2e20745d14b55 (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
'\"macro stdmacro
.\"
.\" Copyright (c) 2014 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 PCP 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pcp\f1 \- run a command or summarize an installation
.SH SYNOPSIS
.ft 3
\f3pcp\f1
[pcp options...]
pcp-\f2command\f1
[command options...]
.br
\f3pcp\f1
[\f3\-P\f1]
[\f3\-a\f1 \f2archive\f1]
[\f3\-h\f1 \f2host\f1]
[\f3\-n\f1 \f2pmnsfile\f1]
.ft 1
.SH DESCRIPTION
The
.B pcp
command is used in one of two modes.
By default, it summarizes the Performance Co-Pilot (PCP) installation
on the local host.
This mode can also be used to summarize the installation from a remote
.IR host ,
or a historical installation from a PCP
.IR archive .
.PP
Alternatively, a
.I command
can be passed to
.B pcp
to run, again possibly in the context of a remote
.I host
or historical
.IR archive .
.SH "COMMAND MODE"
When
.B pcp
is invoked with a command to run, it will search for the named
.IR command 
in
.B $PCP_BINADM_DIR
and also
.B $HOME/.pcp/bin
(these are usually scripts, and are installed with a "pcp-" prefix).
This mode of operation allows system performance tools to be
implemented using
.BR PMAPI (3)
services, while still preserving all of their usual command line
options.
These options are thus (indirectly) augmented with the standard PCP
option set, as described in
.BR PCPIntro (1).
.PP
This provides a convenient mechanism for obtaining retrospective or
remote monitoring capabilities while preserving the behaviour of the
system tools.
.PP
For example, the
.BR pcp-free (1)
utility can be invoked as follows, for recorded data from host
.IR munch :
.PP
.nf
.ft CW
$ pcp -a $PCP_LOG_DIR/pmlogger/\fImunch\fP/20140317 \-O 11:35:50am \fBfree \-m\fP
             total       used       free     shared    buffers     cached
Mem:         23960      14554       9406          0        176       2137
-/+ buffers/cache:      12240      11720
Swap         12047          0      12047
.ft R
.fi
.PP
A complete list of the available and installed tools is provided
along with the
.BR pcp (1)
usage message, but some examples include:
.BR pcp-free (1),
.BR pcp-uptime (1)
and
.BR pcp-numastat (1).
.SH "SUMMARY MODE"
The
summary report includes: the OS version, a summary of the hardware inventory,
the local timezone, the PCP software version, the state of the
.BR pmcd (1)
process and associated Performance Metrics Domain Agents
(PMDAs), as well as information about any PCP archive loggers (\c
.BR pmlogger (1))
and PCP inference engines (\c
.BR pmie (1))
that are running.
.PP
With no arguments,
.B pcp
reports on the local host, however the
following options are accepted:
.IP "\f3\-a\f1 \f2archive\f1"
Report the PCP
configuration as described in the PCP archive log
.IR archive .
.IP "\f3\-h\f1 \f2host\f1"
Report the PCP configuration on 
.I host
rather than the local host.
.IP "\f3\-n\f1 \f2pmnsfile\f1"
Load an alternative Performance Metrics Name Space
.RB ( pmns (5))
from the file
.IR pmnsfile .
.IP \f3\-P\f1
Display
.B pmie
performance information \- counts of rules evaluating to true, false, or
indeterminate, as well as the expected rate of rule calculation, for each
.B pmie
process running on the default host.
Refer to the individual metric help text for full details on these values.
.PP
All of the displayed values are performance
.I metric
values and further information for each can be obtained using the command:
.in 1.0i
.ft CW
.nf

$ pminfo \-dtT \f2metric\f1

.fi
.ft R
.in
The complete set of
.IR metric s
required by
.B pcp
to produce its output is contained in
.BR $PCP_VAR_DIR/config/pmlogconf/tools/pcp-summary .
.SH FILES
.PD 0
.TP 10
.B $HOME/.pcp/bin
Per-user location for
.I command
scripts.
.TP
.B $PCP_BINADM_DIR
System location for installed
.I command
scripts.
.TP
.B $PCP_VAR_DIR/config/pmlogconf/tools/pcp-summary
.BR pmlogconf (1)
configuration file for collecting all of the metrics required by
.BR pcp .
.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
.B /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 pcp-free (1),
.BR pcp-uptime (1),
.BR pcp-numastat (1),
.BR pmcd (1),
.BR pmie (1),
.BR pmlogconf (1),
.BR pmlogger (1),
.BR pcp.conf (5)
and
.BR pcp.env (5).
.SH DIAGNOSTICS
.B pcp 
will terminate with an exit status of 
.B 1
if 
.B pmcd
on the target host could not be reached or the archive could not be opened, 
or
.B 2
for any other error.