LinuxCommandLibrary

pdsh

runs commands in parallel

TLDR

Run command on hosts
$ pdsh -w [host1,host2] [command]
copy
Run on host range
$ pdsh -w [host[1-10]] [command]
copy
Use SSH
$ pdsh -R ssh -w [hosts] [command]
copy
Run with sudo
$ pdsh -w [hosts] sudo [command]
copy
Copy files to hosts
$ pdcp -w [hosts] [local_file] [remote_path]
copy

SYNOPSIS

pdsh [options] [command]

DESCRIPTION

pdsh runs commands in parallel. Parallel distributed shell.
The tool executes on multiple hosts. High performance cluster administration.

PARAMETERS

-w HOSTS

Target hosts.
-R MODULE
Remote shell module.
-l USER
Remote username.
-t TIMEOUT
Connect timeout.
-f FANOUT
Parallel connections.

CAVEATS

Requires remote access configured. Module dependent (ssh, rsh).

HISTORY

pdsh was created for parallel command execution across cluster nodes.

SEE ALSO

ssh(1), pssh(1), ansible(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard