NAME

SYNOPSIS

DESCRIPTION

dsh executes command remotely on several different machines at the same time. An utility to effectively do a for a in $(seq 1 10); do rsh $a command; done

OPTIONS

The options available are as follows.

--verbose | -v

Verbose output of the execution process is output.

--quiet | -q

Makes output quieter.

--machine machinename | -m machinename

Adds machinename to the list of machines that the command is exeuted. The syntax of machinename allows username@machinename where remote shell is invoked with the option to make it of username.

--all | -a

Add all machines found in /etc/dsh/machines.list to the list of machines that the specified command is executed.

--group groupname | -g groupname

Add all machines found in /etc/dsh/group/groupname to the list of machines that the specified command is executed. If groupname is on the form @netgroup then the machines in the given netgroup is used to specify the list of machines to execute on.

--file machinefile | -f machinefile

Add all machines found in the specified file to the list of machines that the specified command is executed.

--remoteshell shellname | -r shellname

Execute remote shell shellname as the remote shell. Usually "rsh" and "ssh" are available

--remoteshellopt rshoption | -o rshoption

Add one option rshoption to the list of options passed on to the remote shell.

--help | -h

Output help message and exits.

--wait-shell | -w

Executes on each machine and waits for the execution finishing before moving on to the next machine.

--concurrent-shell | -c

Executes shell concurrently.

--show-machine-names | -M

Prepends machine names on the standard output. Useful to be used in conjunction with the --concurrent-shell option so that the output is slightly more parsable.

--version | -V

Outputs version information and exits.

--num-topology | -N

Changes the current topology from 1. 1 is the default behavior of spawning the shell from one node to every node. Changing the number to a value greater than 2 would result in dsh being spawned on other machines as well. BE CAREFUL!! This code has not been tested thoroughly.

EXIT STATUS

Usually zero. There is no real way to usefully use the return value of tasks.

On error in command-line options, it will return EXIT_FAILURE.

EXAMPLES

dsh -a w

Shows list of users logged in on all workstations.

dsh -r ssh -a -- w

Shows list of users logged in on all workstations using ssh. (It should be of note that when using ssh, ssh-agent is handy.)

Please note that any user can change the contents of pages on this site,
and therefore the Waikato Linux Users Group can offer no assurances that
the information is correct, and the information on this site is not
necessarily the opinion of the Waikato Linux Users Group, or any of its
members. If you have any complaints about the contents of this page,
please do not hesitate to contact the Waikato Linux Users Group, or, click
the Edit button!

Unless otherwise noted, all pages on this site are licensed under the
WlugWikiLicense.