Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Distributed Systems Administration Utilities User's Guide > Chapter 4 Command Fanout

Parallel Distributed Shell


Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

The Distributed Systems Administration Utilities (DSAU) include the open source tool Parallel Distributed Shell (pdsh). pdsh formalizes the use of remsh and ssh for distributing commands to groups of systems. Unlike remsh/ssh wrappers, pdsh offers the following benefits:

  • High performance

    Commands are issued in parallel to groups of target system. pdsh supports a sliding window or fanout setting to control the number of concurrent commands.

  • Command timeout settings

    pdsh supports a command execution timeout which controls how long a remote command can execute before being disconnected (to prevent problem commands from hanging). It also supports a connect timeout which prevents blocking when remote systems are unreachable.

  • Output processing and return status

    pdsh correctly handles stdout and stderr processing and supports returning a “worst of” return status so the caller can detect errors from remote systems.

  • Flexible target system specifications

    pdsh supports several mechanisms for specifying the target hosts on which to operate. They can be specified on the command line, on stdin, in a well known file (/etc/machines) or in a file pointed to by the WCOLL environment variable. Specific systems can be excluded from the command line as well.

  • Hostlist expressions

    For groups of systems using a prefixNNN naming convention (for example, h1, h2, ..., hN), pdsh allows target nodes specification using hostlist expressions such as “h[1-10]” which would fan out a command to hosts named h1 through h10.

  • Intelligent output filtering

    pdsh prefaces each line of output with the hostname of originating system. dshbak (see dshbak(8)) is a filter that can format the standard pdsh output in several different ways. The dshbak -c flag looks for output from different hosts that is identical and consolidates the output instead of duplicating it. The header will indicate the hosts to which the consolidated output applies.

  • Choice of command transports

    pdsh can use either remote shell rcmd (see rcmd(3)) or ssh as a command transport. Note that the ssh transport offers greatly improved security. See “Security Configuration” for details.

  • Parallel copy command

    The pdcp command provides a parallelized copy command to copy a local source file to multiple targets.

Figure 4-1: “pdsh Architecture ”, shows the components of pdsh and its architecture.

Figure 4-1 pdsh Architecture

pdsh Architecture

For more information on pdsh and dshbak, refer to their reference manpages.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.