Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
dsh(1)
Edit
PageHistory
Diff
Info
LikePages
!!NAME dsh - Distributed shell, or dancer's shell !!SYNOPSIS __dsh [[-m __ ''machinename'' __ | -a | -g __ ''groupname'' __] [[-r __ "remoteshellname" __] [[-c | -w] --__ "commandline" !!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.) ;__./dsh -r ssh -m node1 -m node2 -c -- 'echo $HOSTNAME $(cat/proc/loadavg )'__ : Shows the load average of machines node1 and node2. !!FILES ;__/etc/dsh/machines.list | $(HOME)/.dsh/machines.list__ : List of machine names to be used for when __-a__ command-line option is specified. ;__/etc/dsh/group/__ ''groupname'' __ | $(HOME)/.dsh/group/__ ''groupname'' : List of machine names to be used for when __-g__ command-line option is specified. ;__/etc/dsh/dsh.conf | $(HOME)/.dsh/dsh.conf __ : Configuration file containing the day-to-day default. !!BUGS There should be a __dcp__ for copying files to remote systems. Configuration files should really be able to do something more than it does now. Currently, the algorithm for the __-M__ option is not verified to be right, yet. !!AUTHOR Junichi Uekawa (dancer@debian.org) !!SEE ALSO rsh(1), ssh(1) ---- apt-get install dsh on debian, or check http://www.netfort.gr.jp/~dancer/software/dsh.html.en for other platforms.
One page links to
dsh(1)
:
SSHNotes
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.