aboutsummaryrefslogtreecommitdiff
path: root/multiwatch.1
blob: efd7cf8bb87cf6b57ab3addd3d0246c8120a3bb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.TH multiwatch 1 "September  17, 2010"
.SH NAME
multiwatch \- forks and watches multiple instances of a program in the same environment
.SH SYNOPSIS
.B multiwatch
[options] \-\- <application> [app arguments]

.B multiwatch
\-v

.B multiwatch
\-\-help | \-?
.SH DESCRIPTION
\fImultiwatch\fP is used to fork and watch multiple FastCGI backends.
.SH OPTIONS
.TP 8
.B \-f, \-\-forks=children
Number of children to fork and watch (default 1)
.TP 8
.B \-r, \-\-retry=retries
Number of retries to fork a single child (default 3)
.TP 8
.B \-t, \-\-timeout=msecs
Retry timeout in ms; if the child dies after the timeout the retry counter is reset (default 10000 ms = 10 s)
.TP 8
.B \-s, \-\-signal=signame
Signal to send to children to signal 'graceful' termination (HUP,INT,QUIT,TERM,USR1,USR2, default is USR1)
.TP 8
.B \-?, \-\-help
General usage instructions
.TP 8
.B \-v, \-\-version
Show version and exit
.SH SIGNAL HANDLING
multiwatch will forward the signal USR2; if it receives HUP,INT,QUIT,TERM or USR1, it will send the
signal from \-\-signal to the children; if it receives another signal from that group, it will forward the
signal again.

A signal of the group HUP,INT,QUIT,TERM and USR1 tells multiwatch to go into "shutdown" mode, so it won't
restart children after receiving it.
.SH EXAMPLE
.TP 8
Spawn 2 rails instances on the same FastCGI socket (and supervise them):
.RS 8
.B spawn\-fcgi \-s /tmp/fastcgi\-rails.sock \-n \-\- /usr/bin/multiwatch \-f 2 /home/rails/public/dispatch.fcgi
.RE
.SH SEE ALSO
spawn\-fcgi(1)
.SH AUTHOR
Stefan Buehler <stbuehler@web.de>.