pdsh.1 (2012 03)

pdsh(1) pdsh-2.16 pdsh(1)
(hpux11.31)
NAME
pdsh - issue commands to groups of hosts in parallel
SYNOPSIS
pdsh [options]... command
DESCRIPTION
pdsh is a variant of the rsh(1) command. Unlike rsh(1), which runs commands on a single remote host,
pdsh can run multiple remote commands in parallel. pdsh uses a "sliding window" (or fanout)ofthreads
to conserve resources on the initiating host while allowing some connections to time out. When pdsh
receives SIGINT (ctrl-C), it lists the status of current threads. A second SIGINT within one second ter-
minates the program. Pending threads may be canceled by issuing ctrl-Z within one second of ctrl-C.
Pending threads are those that have not yet been initiated, or are still in the process of connecting to the
remote host.
If a remote command is not specified on the command line, pdsh runs interactively, prompting for com-
mands and executing them when terminated with a carriage return. In interactive mode, target nodes
that time out on the first command are not contacted for subsequent commands, and commands prefixed
with an exclamation point will be executed on the local system. The core functionality of pdsh may be
supplemented by dynamically loadable modules. The modules may provide a new connection protocol
(replacing the standard rcmd(3) protocol used by rsh(1)), filtering options (e.g. removing hosts that are
"down" from the target list), and/or host selection options (e.g., -a selects all hosts from a configuration
file.). By default, pdsh must have at least one "rcmd" module loaded. See the RCMD MODULES section
for more information.
RCMD MODULES
The method by which pdsh runs commands on remote hosts may be selected at runtime using the -R
option (See OPTIONS below). This functionality is ultimately implemented via dynamically loadable
modules, and so the list of available options may be different from installation to installation. A list of
currently available rcmd modules is printed when using any of the -h, -V,or-L options. The default rcmd
module will also be displayed with the -h and -V options.
A list of rcmd modules currently distributed with pdsh follows.
rsh Uses an internal, thread-safe implementation of BSD rcmd(3) to run commands using the
standard rsh(1) protocol.
exec Executes an arbitrary command for each target host. The first of the pdsh remote arguments
is the local command to execute, followed by any further arguments. Some simple parameters
are substitued on the command line, including %h for the target hostname, %u for the remote
username, and %n for the remote rank [0-n] (To get a literal % use %%). For example, the fol-
lowing would duplicate using the ssh module to run hostname(1) across the hosts foo[0-10]:
pdsh -R exec -w foo[0-10] ssh -x -l %u %h hostname
and this command line would run grep(1) in parallel across the files console.foo[0-10]:
pdsh -R exec -w foo[0-10] grep BUG console.%h
ssh Uses a variant of popen(3) to run multiple copies of the ssh(1) command.
mrsh This module uses the mrsh(1) protocol to execute jobs on remote hosts. The mrsh protocol
uses a credential based authentication, forgoing the need to allocate reserved ports. In other
aspects, it acts just like rsh. Remote nodes must be running mrshd(8) in order for the mrsh
module to work.
qsh Allows pdsh to execute MPI jobs over QsNet. Qshell propagates the current working directory,
pdsh environment, and Elan capabilities to the remote process. The following environment
variable are also appended to the environment: RMS_RANK, RMS_NODEID, RMS_PROCID,
RMS_NNODES, and RMS_NPROCS. Since pdsh needs to run setuid root for qshell support,
qshell does not directly support propagation of LD_LIBRARY_PATH and LD_PREOPEN.
Instead the QSHELL_REMOTE_LD_LIBRARY_PATH and
QSHELL_REMOTE_LD_PREOPEN environment variables will may be used and will be
remapped to LD_LIBRARY_PATH and LD_PREOPEN by the qshell daemon if set.
mqsh Similar to qshell, but uses the mrsh protocol instead of the rsh protocol.
HP-UX 11i Version 3: March 2012 1 Hewlett-Packard Company 1

Summary of content (6 pages)