Fix deadlock caused by:
[polysh.git] / gsh.1
blob29cecbec8bbba6d0aaddcce08809cda581d555fd
1 .TH "gsh" "1" "0.3" "Guillaume Chazarain" "Remote shells"
2 .SH "NAME"
3 gsh \- Group Shell
4 .SH "SYNOPSIS"
5 \fBgsh\fR [OPTIONS]... HOSTS...
6 .SH "DESCRIPTION"
7 \fIgsh\fR spawns many remote shells at once and allows to manage them in a single interface.
8 .SH "PROMPTS"
9 There are two types of prompt in \fIgsh\fR. With the 'ready (NR_HOSTS)>' one, all the remote shells are awaiting commands, and the command line accepts all the readline editing features. Editing features include navigation in the history, searching in the history, completion from the history.
11 When the 'waiting [AVAILABLE/TOTAL]>' prompt is shown, only 'AVAILABLE' remote shells have completed the execution of the latest command, data entered at this prompt is sent to all remote shells, but no fancy command line editing features are provided.
12 .SH "HOST NAMES EXPANSION"
13 Host names with numbers can be generated by gsh using the <START\-END> syntax. The generated numbers will be zero padded according to the number of zeroes in the START and END numbers.
14 .SH "OPTIONS"
15 .TP 
16 \fB\-\-version\fR
17 Show program's version number and exit.
18 .TP 
19 \fB\-h, \-\-help\fR
20 Show the help message and exit.
21 .TP 
22 \fB\-\-hosts\-file=FILE\fR
23 Read hostnames from given file, one per line. Hostnames are given on the command line, but they can also be read from files. The format is one hostname per line, '#' comments and blank lines are skipped.
24 .TP 
25 \fB\-\-command=CMD\fR
26 Command to execute on the remote shells. This starts \fIgsh\fR in non\-interactive mode. It will start the remote shells, send the command, print the output and exit when the command is completed on all remote shells. This is the same as piping a command on the standard input.
27 .TP 
28 \fB\-\-ssh=SSH\fR
29 Ssh command to use [ssh]. By default, \fIgsh\fR spawns remote shells using the ssh command, but another shell command can be specified here. For example, with \-\-ssh='usleep $((RANDOM*50)); exec ssh' a delay will be introduced to avoid all hosts accessing a NFS server at the same time. If the hostname should not be added at the end of the command, the macro %(host)s can be inserted where the hostname should be placed.
30 .TP 
31 \fB\-\-quick\-sh\fR
32 Do not launch a full ssh session. It has been observed that the main slowdown factor is the launching of the shell on the remote host, particularly if it is a heavy\-weight one like Zsh. This option is a synonym of \-\-ssh='ssh \-t %(host)s sh', if the login shell is not sh this option should make remote shells start faster.
33 .TP 
34 \fB\-\-abort\-errors\fR
35 Abort if some shell fails to initialize [ignore]. By default, \fIgsh\fR just logs an error when it cannot succesfully open a remote shell. With this option, it exits with a failure.
36 .TP 
37 \fB\-\-debug\fR
38 Print debugging information. Use this option to see exactly what is transferred between \fIgsh\fR and the remote shells. This option can be dynamically toggled using the set_debug command in the control shell.
39 .SH "CONTROL SHELL"
40 A control shell is available by typing Ctrl\-C. In this mode, instead of sending commands to remote shells, special commands can be sent to \fIgsh\fR. The commands are:
42 .TP 
43 \fBEOF (Ctrl\-D)\fR
44 Go back to \fIgsh\fR.
45 .TP 
46 \fBadd NAMES...\fR
47 Add one or many remote shells.
48 .TP 
49 \fBcontinue\fR
50 Go back to \fIgsh\fR.
51 .TP 
52 \fBdelete_disabled [SHELLS...]\fR
53 Delete the specified or all remote processes that are disabled, in order to have a shorter list. The special characters * ? and [] work as expected.
54 .TP 
55 \fBdisable [SHELLS...]\fR
56 Disable sending commands to all or the specified shells. The special characters * ? and [] work as expected.
57 .TP 
58 \fBenable [SHELLS...]\fR
59 Enable sending commands to all or the specified shells. The special characters * ? and [] work as expected.
60 .TP 
61 \fBhelp [COMMAND]\fR
62 List available commands or show the documentation of a specific command.
63 .TP 
64 \fBlist [SHELLS...]\fR
65 List the specified or all remote shells and their states. The special characters * ? and [] work as expected.
66 .TP 
67 \fBquit\fR
68 Quit \fIgsh\fR.
69 .TP 
70 \fBreconnect [SHELLS...]\fR
71 Try to reconnect to all or the specified remote shells that have been disconnected. The special characters * ? and [] work as expected.
72 .TP 
73 \fBrename [NEW_NAME]\fR
74 Rename all enabled remote processes with the argument. The argument will be shell expanded on the remote processes. With no argument, the original hostname will be restored as the displayed name.
75 .TP 
76 \fBsend_control LETTER [SHELLS...]\fR
77 Send a control character to the specified or all enabled shells. The first argument is the control character to send: c, d or z. The remaining optional arguments are the destination shells. The special characters * ? and [] work as expected.
78 .TP 
79 \fBset_debug y|n [SHELLS...]\fR
80 Enable or disable debugging output for all or the specified shells. The first argument is 'y' to enable the debugging output, 'n' to disable it. The remaining optional arguments are the selected shells. The special characters * ? and [] work as expected.
81 .SH "AUTHOR"
82 Guillaume Chazarain <guichaz@yahoo.fr>
83 .br 
84 See http://guichaz.free.fr/gsh