Annotation of 43BSD/contrib/dsh/man/dsh.1, revision 1.1.1.1

1.1       root        1: .TH DSH 1X "10 November 1982"
                      2: .UC 4
                      3: .SH NAME
                      4: dsh \- distributed shell
                      5: .SH SYNOPSIS
                      6: .B dsh
                      7: [
                      8: .B \-a
                      9: ] [
                     10: .B \-v
                     11: ] [
                     12: .B \-h
                     13: host
                     14: ] [
                     15: .B \-n
                     16: ] [
                     17: .B \-i
                     18: copyto
                     19: ] [
                     20: .B \-o
                     21: copyback
                     22: ] command
                     23: .SH DESCRIPTION
                     24: .I Dsh
                     25: selects a host and executes the specified \fIcommand\fR on it.
                     26: If the command specifies a host using the 
                     27: .B \-h
                     28: option,  that host is used.
                     29: Otherwise the selection algorithm attempts to select the
                     30: least loaded of the hosts.  At the moment "least loaded" corresponds
                     31: to the lowest load average.
                     32: .I Dsh
                     33: copies its standard input to the remote command, the standard
                     34: output of the remote command to its standard output, and the
                     35: standard error of the remote command to its standard error.
                     36: Interrupt is propogated to the remote system.
                     37: \fIDsh\fP normally terminates when the remote command does.
                     38: .PP 
                     39: The host is selected from a list of hosts.  A default for this list
                     40: exists on each system in a file called 
                     41: .I /usr/lib/dshrc.
                     42: This list can be overridden by an entry in a 
                     43: .I .dshrc
                     44: file in the user's home directory.  The format of the entry is:
                     45: .PP
                     46: \ \ \ hosts = [<weight>]<host>, ... , [<weight>]<host>
                     47: .PP
                     48: where <host> can be simply a host name or a binary tuple of the form:
                     49: .PP
                     50: \ \ \ (<host name>, <account name>)
                     51: .PP
                     52: where <weight> is a multiplier of the form:
                     53: .PP
                     54: \ \ \ <decimal number>*
                     55: .PP
                     56: The account used to run the command is by default the account of
                     57: the user executing the dsh.  This can be overridden using the second
                     58: form of the host specification shown above.  For example a user "mini"
                     59: that wanted to execute commands on HOST1 as herself and on HOST2 as
                     60: "mickey" would have a 
                     61: .I .dshrc
                     62: file with the entry:
                     63: .PP
                     64: \ \ \ hosts = HOST1, (HOST2, mickey)
                     65: .PP
                     66: Of course "mickey" must have an entry in his .rhosts file to allow "mini"
                     67: to use his account.
                     68: .PP
                     69: If "mini" wanted to wieght HOST1 so that it 
                     70: would be used even when its load average was twice that of HOST2
                     71: she would use:
                     72: .PP
                     73: \ \ \ hosts = 2.1*HOST1, (HOST2, mickey)
                     74: .PP
                     75: The directory created to run the command in on the remote machine is 
                     76: normally in 
                     77: the account's login directory.  This can be overridden by another entry 
                     78: in the 
                     79: .I .dshrc
                     80: file of the format:
                     81: .PP
                     82: \ \ \ dir = <directory name>
                     83: .PP
                     84: If the 
                     85: .I \-v
                     86: option is specified
                     87: .I dsh
                     88: reports the name of the machine the command is executed on.
                     89: .PP
                     90: Shell metacharacters which are not quoted are interpreted
                     91: on local machine, while quoted metacharacters are interpreted on
                     92: the remote machine.
                     93: Thus the command
                     94: .PP
                     95: \ \ \ dsh cat remotefile >> localfile
                     96: .PP
                     97: appends the remote file
                     98: .I remotefile
                     99: to the localfile
                    100: .I localfile,
                    101: while
                    102: .PP
                    103: \ \ \ dsh cat remotefile ">>" otherremotefile
                    104: .PP
                    105: appends
                    106: .I remotefile
                    107: to
                    108: .I otherremotefile.
                    109: .PP
                    110: The
                    111: .I \-i 
                    112: option is used to transfer the 
                    113: .I copyto
                    114: file to the remote host before the command is executed.  More
                    115: than one 
                    116: .I \-i 
                    117: option may be specified.
                    118: .PP
                    119: The
                    120: .I \-o 
                    121: option is used to transfer the 
                    122: .I copyback
                    123: file back from the remote host after the command is executed.  More
                    124: than one 
                    125: .I \-o
                    126: option may be specified.
                    127: .PP
                    128: The 
                    129: .I \-a
                    130: option causes 
                    131: .I dsh
                    132: to try to execute the command on as many hosts as it can.
                    133: .PP
                    134: Host names are given in the file 
                    135: .I /usr/lib/hosts.
                    136: Each host
                    137: has one standard name (the first name given in the file), which
                    138: is rather long and unambiguous, and optionally one or more nicknames.
                    139: .SH FILES
                    140: .ta 2i
                    141: ~/.dshrc       the user's initialization file
                    142: .br
                    143: /usr/lib/dshrc the system defaults
                    144: .br
                    145: /usr/ucb/dbid  the bidder (must exist on each machine)
                    146: .DT
                    147: .SH SEE ALSO
                    148: rlogin(1x), rpasswd(1x), rsh(1x)
                    149: .SH BUGS
                    150: If you are using
                    151: .IR csh (1)
                    152: and put a
                    153: .IR dsh (1x)
                    154: in the background without redirecting its input
                    155: away from the terminal, it will block even if no reads
                    156: are posted by the remote command.  If no input is desired
                    157: you should redirect the input of
                    158: .I dsh
                    159: to /dev/null using the
                    160: .B \-n
                    161: option.
                    162: .PP
                    163: You cannot run an interactive command
                    164: (like
                    165: .IR rogue (6)
                    166: or
                    167: .I vi (6));
                    168: use
                    169: .IR rlogin (1x).
                    170: .PP
                    171: Stop signals stop the local \fIdsh\fP process only; this is arguably
                    172: wrong, but currently hard to fix for reasons too complicated to
                    173: explain here.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.