1pdsh(1) General Commands Manual pdsh(1)
2
3
4
6 pdcp - copy files to groups of hosts in parallel
7
8
10 pdcp [options]... src [src2...] dest
11
12
14 pdcp is a variant of the rcp(1) command. Unlike rcp(1), which copies
15 files to a single remote host, pdcp can copy files to multiple remote
16 hosts in parallel. However, pdcp does not recognize files in the for‐
17 mat ``rname@rhost:path,'' therefore all source files must be on the
18 local host machine. Destination nodes must be listed on the pdcp com‐
19 mand line using a suitable target nodelist option (See the OPTIONS sec‐
20 tion below). Each destination node listed must have pdcp installed for
21 the copy to succeed.
22
23 When pdcp receives SIGINT (ctrl-C), it lists the status of current
24 threads. A second SIGINT within one second terminates the program.
25 Pending threads may be canceled by issuing ctrl-Z within one second of
26 ctrl-C. Pending threads are those that have not yet been initiated, or
27 are still in the process of connecting to the remote host.
28
29
30 Like pdsh(1), the functionality of pdcp may be supplemented by dynami‐
31 cally loadable modules. In pdcp, the modules may provide a new connect
32 protocol (replacing the standard rsh(1) protocol), filtering options
33 (e.g. excluding hosts that are down), and/or host selection options
34 (e.g. -a selects all nodes from a local config file). By default, pdcp
35 requires at least one "rcmd" module to be loaded (to provide the chan‐
36 nel for remote copy).
37
38
40 The method by which pdcp connects to remote hosts may be selected at
41 runtime using the -R option (See OPTIONS below). This functionality is
42 ultimately implemented via dynamically loadable modules, and so the
43 list of available options may be different from installation to instal‐
44 lation. A list of currently available rcmd modules is printed when
45 using any of the -h, -V, or -L options. The default rcmd module will
46 also be displayed with the -h and -V options.
47
48 A list of rcmd modules currently distributed with pdcp follows.
49
50 rsh Uses an internal, thread-safe implementation of BSD rcmd(3) to
51 run commands using the standard rsh(1) protocol.
52
53 ssh Uses a variant of popen(3) to run multiple copies of the ssh(1)
54 command.
55
56 mrsh This module uses the mrsh(1) protocol to execute jobs on remote
57 hosts. The mrsh protocol uses a credential based authentica‐
58 tion, forgoing the need to allocate reserved ports. In other
59 aspects, it acts just like rsh.
60
61 krb4 The krb4 module allows users to execute remote commands after
62 authenticating with kerberos. Of course, the remote rshd dae‐
63 mons must be kerberized.
64
65 xcpu The xcpu module uses the xcpu service to execute remote com‐
66 mands.
67
68
70 The list of available pdcp options is determined at runtime by supple‐
71 menting the list of standard pdcp options with any options provided by
72 loaded rcmd and misc modules. In some cases, options provided by mod‐
73 ules may conflict with each other. In these cases, the modules are
74 incompatible and the first module loaded wins.
75
76
78 -w host,host,...
79 Target the specified list of hosts. Do not use with any other
80 node selection options (e.g. -a, -g if they are available). No
81 spaces are allowed in the comma-separated list. A list consist‐
82 ing of a single `-' character causes the target hosts to be read
83 from stdin, one per line. The host list may contain hostlist
84 expressions of the form ``host[1-5,7]''. For more information
85 about the hostlist format, see the HOSTLIST EXPRESSIONS section
86 below.
87
88 -x host,host,...
89 Exclude the specified hosts. May be specified in conjunction
90 with other target node list options such as -a and -g (when
91 available). Hostlists may also be specified to the -x option
92 (see HOSTLIST EXPRESSIONS secion below).
93
94
96 -h Output usage menu and quit. A list of available rcmd modules
97 will be printed at the end of the usage message.
98
99 -q List option values and the target nodelist and exit without
100 action.
101
102 -b Disable ctrl-C status feature so that a single ctrl-C kills par‐
103 allel copy. (Batch Mode)
104
105 -r Copy directories recursively.
106
107 -p Preserve modification time and modes.
108
109 -l user
110 This option may be used to copy files as another user, subject
111 to authorization. For BSD rcmd, this means the invoking user and
112 system must be listed in the user´s .rhosts file (even for
113 root).
114
115 -t seconds
116 Set the connect timeout. Default is 10 seconds.
117
118 -f number
119 Set the maximum number of simultaneous remote copies to number.
120 The default is 32.
121
122 -R name
123 Set rcmd module to name. This option may also be set via the
124 PDSH_RCMD_TYPE environment variable. A list of available rcmd
125 modules may be obtained via either the -h or -L options.
126
127 -L List info on all loaded pdcp modules and quit.
128
129 -d Include more complete thread status when SIGINT is received, and
130 display connect and command time statistics on stderr when done.
131
132 -V Output pdcp version information, along with list of currently
133 loaded modules, and exit.
134
135
136
138 As noted in sections above, pdcp accepts ranges of hostnames in the
139 general form: prefix[n-m,l-k,...], where n < m and l < k, etc., as an
140 alternative to explicit lists of hosts. This form should not be con‐
141 fused with regular expression character classes (also denoted by
142 ``[]''). For example, foo[19] does not represent foo1 or foo9, but
143 rather represents a degenerate range: foo19.
144
145 This range syntax is meant only as a convenience on clusters with a
146 prefixNN naming convention and specification of ranges should not be
147 considered necessary -- the list foo1,foo9 could be specified as such,
148 or by the range foo[1,9].
149
150 Some examples of range usage follow:
151
152
153 Copy /etc/hosts to foo01,foo02,...,foo05
154 pdcp -w foo[01-05] /etc/hosts /etc
155
156 Copy /etc/hosts to foo7,foo9,foo10
157 pdcp -w foo[7,9-10] /etc/hosts /etc
158
159 Copy /etc/hosts to foo0,foo4,foo5
160 pdcp -w foo[0-5] -x foo[1-3] /etc/hosts /etc
161
162
163 As a reminder to the reader, some shells will interpret brackets ('['
164 and ']') for pattern matching. Depending on your shell, it may be nec‐
165 essary to enclose ranged lists within quotes. For example, in tcsh,
166 the first example above should be executed as:
167
168 pdcp -w "foo[01-05]" /etc/hosts /etc
169
170
172 Pdsh/pdcp was originally a rewrite of IBM dsh(1) by Jim Garlick <gar‐
173 lick@llnl.gov> on LLNL's ASCI Blue-Pacific IBM SP system. It is now
174 also used on Linux clusters at LLNL.
175
176
178 When using ssh for remote execution, stderr of ssh to be folded in with
179 that of the remote command. When invoked by pdcp, it is not possible
180 for ssh to prompt for confirmation if a host key changes, prompt for
181 passwords if RSA keys are not configured properly, etc.. Finally, the
182 connect timeout is not adjustable when ssh is used.
183
184 Host range parsing assumes numerical part of hostname is at the end,
185 e.g. specifying foo[0-5]bar will not work.
186
187
189 pdsh(1)
190
191
192
193pdsh-2.11 linux-gnu pdsh(1)