0
|
1 |
'\" t
|
|
2 |
.\"
|
|
3 |
.\" CDDL HEADER START
|
|
4 |
.\"
|
|
5 |
.\" The contents of this file are subject to the terms of the
|
|
6 |
.\" Common Development and Distribution License (the "License").
|
|
7 |
.\" You may not use this file except in compliance with the License.
|
|
8 |
.\"
|
|
9 |
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
|
10 |
.\" or http://www.opensolaris.org/os/licensing.
|
|
11 |
.\" See the License for the specific language governing permissions
|
|
12 |
.\" and limitations under the License.
|
|
13 |
.\"
|
|
14 |
.\" When distributing Covered Code, include this CDDL HEADER in each
|
|
15 |
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
16 |
.\" If applicable, add the following below this CDDL HEADER, with the
|
|
17 |
.\" fields enclosed by brackets "[]" replaced with your own identifying
|
|
18 |
.\" information: Portions Copyright [yyyy] [name of copyright owner]
|
|
19 |
.\"
|
|
20 |
.\" CDDL HEADER END
|
|
21 |
.\"
|
11
|
22 |
.\" Copyright 2010 Sun Microsystems, Inc. All rights reserved.
|
0
|
23 |
.\" Use is subject to license terms.
|
|
24 |
.\"
|
11
|
25 |
.\" ident "@(#)pdcp.1 1.2 10/03/16 SMI"
|
0
|
26 |
.\"
|
|
27 |
\." $Id: pdcp.1.in 1174 2008-11-25 21:17:05Z grondo $
|
|
28 |
.TH "pdsh" "1" "solaris2.11" "pdsh-2.18"
|
|
29 |
|
|
30 |
.SH NAME
|
|
31 |
pdcp \- copy files to groups of hosts in parallel
|
|
32 |
.br
|
|
33 |
rpdcp \- (reverse pdcp) copy files from a group of hosts in parallel
|
|
34 |
|
|
35 |
.SH SYNOPSIS
|
|
36 |
\fBpdcp\fR [\fIoptions\fR]... src [src2...] dest
|
|
37 |
.br
|
|
38 |
\fBrpdcp\fR [\fIoptions\fR]... src [src2...] dir
|
|
39 |
|
|
40 |
.SH DESCRIPTION
|
|
41 |
\fBpdcp\fR is a variant of the rcp(1) command. Unlike rcp(1), which
|
|
42 |
copies files to a single remote host, \fBpdcp\fR can copy files to
|
|
43 |
multiple remote hosts in parallel. However, \fBpdcp\fR does
|
|
44 |
not recognize files in the format ``rname@rhost:path,'' therefore all
|
|
45 |
source files must be on the local host machine. Destination nodes must
|
|
46 |
be listed on the \fBpdcp\fR command line using a suitable target
|
|
47 |
nodelist option (See the \fIOPTIONS\fR section below). Each destination
|
|
48 |
node listed must have \fBpdcp\fR installed for the copy to succeed.
|
|
49 |
.LP
|
|
50 |
When \fBpdcp\fR receives SIGINT (ctrl-C), it lists the status of current
|
|
51 |
threads. A second SIGINT within one second terminates the program. Pending
|
|
52 |
threads may be canceled by issuing ctrl-Z within one second of ctrl-C.
|
|
53 |
Pending threads are those that have not yet been initiated, or are still
|
|
54 |
in the process of connecting to the remote host.
|
|
55 |
.LP
|
|
56 |
Like pdsh(1), the functionality of \fBpdcp\fR may be supplemented by
|
|
57 |
dynamically loadable modules. In \fBpdcp\fR, the modules may provide
|
|
58 |
a new connect protocol (replacing the standard rsh(1) protocol), filtering
|
|
59 |
options (e.g. excluding hosts that are down), and/or host selection
|
|
60 |
options.
|
|
61 |
By default, \fBpdcp\fR requires at least one "rcmd" module to be
|
|
62 |
loaded (to provide the channel for remote copy).
|
|
63 |
|
|
64 |
.SH "REVERSE PDCP"
|
|
65 |
\fBrpdcp\fR performs a reverse parallel copy. Rather than copying files
|
|
66 |
to remote hosts, files are retrieved from remote hosts and stored locally.
|
|
67 |
All directories or files retrieved will be stored with their remote
|
|
68 |
hostname appended to the filename. The destination file must be a
|
|
69 |
directory when this option is used.
|
|
70 |
.LP
|
|
71 |
In other respects, \fBrpdcp\fR is exactly like \fBpdcp\fR, and further
|
|
72 |
statements regarding \fBpdcp\fR in this manual also apply to \fBrpdcp\fR.
|
|
73 |
|
|
74 |
.SH "RCMD MODULES"
|
|
75 |
The method by which \fBpdcp\fR connects to remote hosts may be
|
|
76 |
selected at runtime using the \fI-R\fR option (See \fIOPTIONS\fR below).
|
|
77 |
This functionality is ultimately implemented via dynamically loadable
|
|
78 |
modules, and so the list of available options may be different
|
|
79 |
from installation to installation. A list of currently available rcmd
|
|
80 |
modules is printed when using any of the \fI-h\fR, \fI-V\fR, or \fI-L\fR
|
|
81 |
options. The default rcmd module will also be displayed with the
|
|
82 |
\fI-h\fR and \fI-V\fR options.
|
|
83 |
.LP
|
|
84 |
A list of \fIrcmd\fR modules currently distributed with \fBpdcp\fR
|
|
85 |
follows.
|
|
86 |
.TP 8
|
|
87 |
rsh
|
|
88 |
Uses an internal, thread-safe implementation of BSD rcmd(3)
|
|
89 |
to run commands using the standard rsh(1) protocol.
|
|
90 |
.TP
|
|
91 |
ssh
|
|
92 |
Uses a variant of popen(3) to run multiple copies of the ssh(1)
|
|
93 |
command.
|
|
94 |
|
|
95 |
.SH OPTIONS
|
|
96 |
The list of available \fBpdcp\fR options is determined at runtime
|
|
97 |
by supplementing the list of standard \fBpdcp\fR options with
|
|
98 |
any options provided by loaded \fIrcmd\fR and \fImisc\fR modules.
|
|
99 |
In some cases, options provided by modules may conflict with
|
|
100 |
each other. In these cases, the modules are incompatible and
|
|
101 |
the first module loaded wins.
|
|
102 |
|
|
103 |
.SH "Standard target nodelist options"
|
|
104 |
.TP
|
|
105 |
.I "-w host,host,..."
|
|
106 |
Target the specified list of hosts. Do not use with any other
|
|
107 |
node selection options (e.g. \fI\-g\fR if they are available).
|
|
108 |
No spaces are allowed in the comma-separated list.
|
|
109 |
A list consisting of a single `-' character causes the target
|
|
110 |
hosts to be read from stdin, one per line. The host list may
|
|
111 |
contain hostlist expressions of the form ``host[1-5,7]''. For
|
|
112 |
more information about the hostlist format, see the
|
|
113 |
\fBHOSTLIST EXPRESSIONS\fR section below.
|
|
114 |
.TP
|
|
115 |
.I "-x host,host,..."
|
|
116 |
Exclude the specified hosts. May be specified in conjunction with
|
|
117 |
other target node list options such as \fI\-g\fR (when available).
|
|
118 |
Hostlists may also be specified to the \fI\-x\fR option
|
|
119 |
(see \fBHOSTLIST EXPRESSIONS\fI secion below).
|
|
120 |
|
|
121 |
.SH "Standard pdcp options"
|
|
122 |
.TP
|
|
123 |
.I "-h"
|
|
124 |
Output usage menu and quit. A list of available rcmd modules
|
|
125 |
will be printed at the end of the usage message.
|
|
126 |
.TP
|
|
127 |
.I "-q"
|
|
128 |
List option values and the target nodelist and exit without action.
|
|
129 |
.TP
|
|
130 |
.I "-b"
|
|
131 |
Disable ctrl-C status feature so that a single ctrl-C kills parallel
|
|
132 |
copy. (Batch Mode)
|
|
133 |
.TP
|
|
134 |
.I "-r"
|
|
135 |
Copy directories recursively.
|
|
136 |
.TP
|
|
137 |
.I "-p"
|
|
138 |
Preserve modification time and modes.
|
|
139 |
.TP
|
|
140 |
.I "-e PATH"
|
|
141 |
Explicitly specify path to remote \fBpdcp\fR binary
|
|
142 |
instead of using the locally executed path.
|
|
143 |
.TP
|
|
144 |
.I "-l user"
|
|
145 |
This option may be used to copy files as another user, subject to
|
|
146 |
authorization. For BSD rcmd, this means the invoking user and system must
|
|
147 |
be listed in the user\'s .rhosts file (even for root).
|
|
148 |
.TP
|
|
149 |
.I "-t seconds"
|
|
150 |
Set the connect timeout. Default is 10 seconds.
|
|
151 |
.TP
|
|
152 |
.I "-f number"
|
|
153 |
Set the maximum number of simultaneous remote copies to \fInumber\fR.
|
|
154 |
The default is 32.
|
|
155 |
.TP
|
|
156 |
.I "-R name"
|
|
157 |
Set rcmd module to \fIname\fR. This option may also be set via the
|
|
158 |
PDSH_RCMD_TYPE environment variable. A list of available rcmd
|
|
159 |
modules may be obtained via either the \fI-h\fR or \fI-L\fR options.
|
|
160 |
.TP
|
|
161 |
.I "-R name"
|
|
162 |
Set rcmd module to \fIname\fR. This option may also be set via the
|
|
163 |
PDSH_RCMD_TYPE environment variable. A list of available rcmd
|
|
164 |
modules may be obtained via either the \fI-h\fR or \fI-L\fR options.
|
|
165 |
.TP
|
|
166 |
.I "-L"
|
|
167 |
List info on all loaded \fBpdcp\fR modules and quit.
|
|
168 |
.TP
|
|
169 |
.I "-d"
|
|
170 |
Include more complete thread status when SIGINT is received, and display
|
|
171 |
connect and command time statistics on stderr when done.
|
|
172 |
.TP
|
|
173 |
.I "-V"
|
|
174 |
Output \fBpdcp\fR version information, along with list of currently
|
|
175 |
loaded modules, and exit.
|
|
176 |
|
|
177 |
|
|
178 |
.SH "HOSTLIST EXPRESSIONS"
|
|
179 |
As noted in sections above,
|
|
180 |
.B pdcp
|
|
181 |
accepts ranges of hostnames in
|
|
182 |
the general form: prefix[n-m,l-k,...], where n < m and l < k, etc.,
|
|
183 |
as an alternative to explicit lists of hosts. This form should not
|
|
184 |
be confused with regular expression character classes (also denoted
|
|
185 |
by ``[]''). For example, foo[19] does not represent foo1 or foo9, but
|
|
186 |
rather represents a degenerate range: foo19.
|
|
187 |
|
|
188 |
This range syntax is meant
|
|
189 |
only as a convenience on clusters with a prefixNN naming convention and
|
|
190 |
specification of ranges should not be considered necessary -- the list
|
|
191 |
foo1,foo9 could be specified as such, or by the range foo[1,9].
|
|
192 |
|
|
193 |
Some examples of range usage follow:
|
|
194 |
|
|
195 |
.nf
|
|
196 |
|
|
197 |
Copy /etc/hosts to foo01,foo02,...,foo05
|
|
198 |
pdcp -w foo[01-05] /etc/hosts /etc
|
|
199 |
|
|
200 |
Copy /etc/hosts to foo7,foo9,foo10
|
|
201 |
pdcp -w foo[7,9-10] /etc/hosts /etc
|
|
202 |
|
|
203 |
Copy /etc/hosts to foo0,foo4,foo5
|
|
204 |
pdcp -w foo[0-5] -x foo[1-3] /etc/hosts /etc
|
|
205 |
|
|
206 |
.fi
|
|
207 |
|
|
208 |
As a reminder to the reader, some shells will interpret brackets ('['
|
|
209 |
and ']') for pattern matching. Depending on your shell, it may be
|
|
210 |
necessary to enclose ranged lists within quotes. For example, in
|
|
211 |
tcsh, the first example above should be executed as:
|
|
212 |
|
|
213 |
pdcp -w "foo[01-05]" /etc/hosts /etc
|
|
214 |
|
|
215 |
.SH "ORIGIN"
|
|
216 |
Pdsh/pdcp was originally a rewrite of IBM dsh(1) by Jim Garlick
|
|
217 |
<[email protected]> on LLNL's ASCI Blue-Pacific IBM SP system.
|
|
218 |
It is now also used on Linux clusters at LLNL.
|
|
219 |
|
|
220 |
.SH "LIMITATIONS"
|
|
221 |
When using
|
|
222 |
.B ssh
|
|
223 |
for remote execution, stderr of ssh to be folded in with that of the
|
|
224 |
remote command. When invoked by pdcp, it is not possible for ssh to
|
|
225 |
prompt for confirmation if a host key changes, prompt for passwords if
|
|
226 |
RSA keys are not configured properly, etc.. Finally, the connect
|
|
227 |
timeout is only adjustable with ssh when the underlying ssh implementation
|
|
228 |
supports it, and pdsh has been built to use the correct option.
|
|
229 |
|
|
230 |
.SH ATTRIBUTES
|
|
231 |
.sp
|
|
232 |
.LP
|
|
233 |
See \fBattributes\fR(5) for descriptions of the following attributes:
|
|
234 |
.sp
|
|
235 |
|
|
236 |
.sp
|
|
237 |
.TS
|
|
238 |
tab() box;
|
|
239 |
cw(2.75i) |cw(2.75i)
|
|
240 |
lw(2.75i) |lw(2.75i)
|
|
241 |
.
|
|
242 |
ATTRIBUTE TYPEATTRIBUTE VALUE
|
|
243 |
_
|
11
|
244 |
Availabilityshell/pdsh
|
0
|
245 |
_
|
|
246 |
Interface Stabilityuncommitted
|
|
247 |
.TE
|
|
248 |
|
|
249 |
.SH "SEE ALSO"
|
|
250 |
pdsh(1)
|