.TH "dsh" 1 "2007 Aug 15" "Debian-Beowulf/Dancer" "Dancer Tools reference" .SH NAME dsh \- Distributed shell, or dancer's shell .SH SYNOPSIS .BI "dsh [\-m " "machinename" " | \-a | \-g " "groupname" "] [\-r " \ "remoteshellname" "] [\-c | \-w | \-i | \-F " "forklimit" " ] \-\- " "commandline" .SH DESCRIPTION .B dsh executes command remotely on several different machines at the same time. An utility to effectively do a .B "for a in $(seq 1 10); do rsh $a command; done" in bourne shell. .SH OPTIONS The options available are as follows. .TP .B "\-\-verbose | \-v" Give verbose output of the execution process. .PP .TP .B "\-\-quiet | \-q" Makes output quieter. .PP .TP .BI "\-\-machine | \-m " "[machinename[,machinename]*]" Adds .I machinename to the list of machines that the command is exeuted. The syntax of .I machinename allows .I username@machinename where remote shell is invoked with the option to make it of .I username. From version 0.21.4, it is possible to specify in the format of .I "username@machinename,username@machinename,username@machinename" so that multiple hosts can be specified with comma-delimited values. .TP .BI "\-\-all | \-a " Add all machines found in .B /etc/dsh/machines.list to the list of machines that the specified command is executed. .TP .BI "\-\-group " "groupname" " | \-g " "groupname " Add all machines found in .BI /etc/dsh/group/ groupname to the list of machines that the specified command is executed. If groupname is on the form .BI "@netgroup" then the machines in the given netgroup is used to specify the list of machines to execute on. .TP .BI "\-\-file " "machinefile" " | \-f " "machinefile" Add all machines found in the specified file to the list of machines that the specified command is executed. The file should list one machine specification per line (with the same syntax as the .I machinename argument). Lines starting with "#" are ignored. From version 0.21.4, Specifying the same machine several times using any of the machine specification options will result in multiple invocations merged into one. .TP .BI "\-\-remoteshell " "shellname " "| \-r " "shellname " Execute remote shell .I shellname as the remote shell. Usually any of "rsh", "remsh" or "ssh" are available .TP .BI "\-\-remoteshellopt " "rshoption " "| \-o " "rshoption " Add one option .I rshoption to the list of options passed on to the remote shell. .TP .BI "\-\-help | \-h " Output help message and exits. .TP .BI "\-\-wait\-shell | \-w " Executes on each machine and waits for the execution finishing before moving on to the next machine. .TP .BI "\-\-concurrent\-shell | \-c " Executes shell concurrently. .TP .BI "\-\-show\-machine\-names | \-M " Prepends machine names on the standard output. Useful to be used in conjunction with the .B "\-\-concurrent\-shell" option so that the output is slightly more parsable. .TP .BI "\-\-hide\-machine\-names | \-H " Do not prepend machine names on the standard output. .TP .BI "\-\-duplicate\-input | \-i " Duplicates the input to dsh process to individual process that are remotely invoked. Needs to have .B "\-\-concurrent\-shell" set. Due to limitations in current implementation, it is only useful for running shell. Terminate the shell session with ctrl-D. .TP .BI "\-\-bufsize | \-b [" "buffer-size in bytes" "]" Sets the buffer size used in replicating input for .B "\-\-duplicate\-input" option. .TP .BI "\-\-version | \-V " Outputs version information and exits. .TP .BI "\-\-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. .TP .BI "\-\-forklimit | \-F " "fork limit" Similar to .B "\-c" with a limit on the number of simultaneous connections. dsh will wait before creating new connection if the limit is reached. Useful when the number of nodes to be accessed is going somewhere above 200, and using .B "\-N" option is not possible. .SH "EXIT STATUS" The first non-zero exit code of child processes is returned, or zero if none returned non-zero exit code. 1 if error is found in command-line specifications. 2 if signal is received from child processes. .SH "EXAMPLES" .TP .B "dsh \-a w " Shows list of users logged in on all workstations. .PP .TP .B "dsh \-r ssh \-a \-\- w " Shows list of users logged in on all workstations, and use ssh command to connect. (It should be of note that when using ssh, ssh-agent is handy.) .PP .TP .B "dsh \-r ssh \-m node1 \-m node2 \-c \-\- 'echo $HOSTNAME $(cat/proc/loadavg )'" Shows the load average of machines node1 and node2. .PP .SH "FILES" .TP .B "/etc/dsh/machines.list | $(HOME)/.dsh/machines.list" List of machine names to be used for when .B \-a command-line option is specified. .PP .TP .BI "/etc/dsh/group/" "groupname" " | $(HOME)/.dsh/group/" "groupname" List of machine names to be used for when .BI "\-g " "groupname" command-line option is specified. .PP .TP .B "/etc/dsh/dsh.conf | $(HOME)/.dsh/dsh.conf " Configuration file containing the day-to-day default. .PP .SH "BUGS" There should be a .B "dcp" for copying files to remote systems. Configuration files should really be able to do something more than it does now. .SH "AUTHOR" Junichi Uekawa (dancer@debian.org) Upstream page is available at .B "http://www.netfort.gr.jp/~dancer/software/dsh.html" .SH "SEE ALSO" .BR "rsh" "(1), " .BR "ssh" "(1), " .BR "remsh" "(1), " .BR "dsh.conf" "(5), " .BR "cssh" "(1), " .BR "dish" "(1), " .BR "pssh" "(1), " .BR "taktuk" "(1) "