blob: ca9916461eff3c2e721082fbbcc7c9389cda205d [file] [log] [blame]
David Ward7b0df9c2012-04-30 11:36:16 -04001.\" This file was originally generated by help2man 1.36.
2.TH WATCHQUAGGA 8 "July 2010"
3.SH NAME
4watchquagga \- a program to monitor the status of quagga daemons
5.SH SYNOPSIS
6.B watchquagga
7.RI [ option ...]
8.IR daemon ...
9.br
10.B watchquagga
11.BR \-h " | " \-v
12.SH DESCRIPTION
13.B watchquagga
14is a watchdog program that monitors the status of supplied quagga
15.IR daemon s
16and tries to restart them in case they become unresponsive or shut down.
17.PP
18To determine whether a daemon is running, it tries to connect to the
19daemon's VTY UNIX stream socket, and send echo commands to ensure the
20daemon responds. When the daemon crashes, EOF is received from the socket,
21so that watchquagga can react immediately.
22.PP
23This program can run in one of the following 5 modes:
24.TP
25.B Mode 0: monitor
26In this mode, the program serves as a monitor and reports status changes.
27.IP
28Example usage: watchquagga \-d zebra ospfd bgpd
29.TP
30.B Mode 1: global restart
31In this mode, whenever a daemon hangs or crashes, the given command is used
32to restart all watched daemons.
33.IP
34Example usage: watchquagga \-dz \e
35.br
36-R '/sbin/service zebra restart; /sbin/service ospfd restart' \e
37.br
38zebra ospfd
39.TP
40.B Mode 2: individual daemon restart
41In this mode, whenever a single daemon hangs or crashes, the given command
42is used to restart this daemon only.
43.IP
44Example usage: watchquagga \-dz \-r '/sbin/service %s restart' \e
45.br
46zebra ospfd bgpd
47.TP
48.B Mode 3: phased zebra restart
49In this mode, whenever a single daemon hangs or crashes, the given command
50is used to restart this daemon only. The only exception is the zebra
51daemon; in this case, the following steps are taken: (1) all other daemons
52are stopped, (2) zebra is restarted, and (3) other daemons are started
53again.
54.IP
55Example usage: watchquagga \-adz \-r '/sbin/service %s restart' \e
56.br
57\-s '/sbin/service %s start' \e
58.br
59\-k '/sbin/service %s stop' zebra ospfd bgpd
60.TP
61.B Mode 4: phased global restart for any failure
62In this mode, whenever a single daemon hangs or crashes, the following
63steps are taken: (1) all other daemons are stopped, (2) zebra is restarted,
64and (3) other daemons are started again.
65.IP
66Example usage: watchquagga \-Adz \-r '/sbin/service %s restart' \e
67.br
68\-s '/sbin/service %s start' \e
69.br
70\-k '/sbin/service %s stop' zebra ospfd bgpd
71.PP
72Important: It is believed that mode 2 (individual daemon restart) is not
73safe, and mode 3 (phased zebra restart) may not be safe with certain
74routing daemons.
75.PP
76In order to avoid restarting the daemons in quick succession, you can
77supply the
78.B \-m
79and
80.B \-M
81options to set the minimum and maximum delay between the restart commands.
82The minimum restart delay is recalculated each time a restart is attempted.
83If the time since the last restart attempt exceeds twice the value of
84.BR \-M ,
85the restart delay is set to the value of
86.BR \-m ,
87otherwise the interval is doubled (but capped at the value of
88.BR \-M ).
89.SH OPTIONS
90.TP
91.BR \-d ", " \-\-daemon
92Run in daemon mode. When supplied, error messages are sent to Syslog
93instead of standard output (stdout).
94.TP
95.BI \-S " directory" "\fR, \fB\-\-statedir " directory
96Set the VTY socket
97.I directory
98(the default value is "/var/run/quagga").
99.TP
100.BR \-e ", " \-\-no\-echo
101Do not ping the daemons to test whether they respond. This option is
102necessary if one or more daemons do not support the echo command.
103.TP
104.BI \-l " level" "\fR, \fB\-\-loglevel " level
105Set the logging
106.I level
107(the default value is "6"). The value should range from 0 (LOG_EMERG) to 7
108(LOG_DEBUG), but higher number can be supplied if extra debugging messages
109are required.
110.TP
111.BI \-m " number" "\fR, \fB\-\-min\-restart\-interval " number
112Set the minimum
113.I number
114of seconds to wait between invocations of the daemon restart commands (the
115default value is "60").
116.TP
117.BI \-M " number" "\fR, \fB\-\-max\-restart\-interval " number
118Set the maximum
119.I number
120of seconds to wait between invocations of the daemon restart commands (the
121default value is "600").
122.TP
123.BI \-i " number" "\fR, \fB\-\-interval " number
124Set the status polling interval in seconds (the default value is "5").
125.TP
126.BI \-t " number" "\fR, \fB\-\-timeout " number
127Set the unresponsiveness timeout in seconds (the default value is "10").
128.TP
129.BI \-T " number" "\fR, \fB\-\-restart\-timeout " number
130Set the restart (kill) timeout in seconds (the default value is "20"). If
131any background jobs are still running after this period has elapsed, they
132will be killed.
133.TP
134.BI \-r " command" "\fR, \fB\-\-restart " command
135Supply a Bourne shell
136.I command
137to restart a single daemon. The command string should contain the '%s'
138placeholder to be substituted with the daemon name.
139.IP
140Note that
141.B \-r
142and
143.B \-R
144options are not compatible.
145.TP
146.BI \-s " command" "\fR, \fB\-\-start\-command " command
147Supply a Bourne shell
148.I command
149to start a single daemon. The command string should contain the '%s'
150placeholder to be substituted with the daemon name.
151.TP
152.BI \-k " command" "\fR, \fB\-\-kill\-command " command
153Supply a Bourne shell
154.I command
155to stop a single daemon. The command string should contain the '%s'
156placeholder to be substituted with the daemon name.
157.TP
158.BR \-R ", " \-\-restart\-all
159When one or more daemons are shut down, try to restart them using the
160Bourne shell command supplied on the command line.
161.IP
162Note that
163.B \-r
164and
165.B \-R
166options are not compatible.
167.TP
168.BR \-z ", " \-\-unresponsive\-restart
169When a daemon is in an unresponsive state, treat it as being shut down for
170the restart purposes.
171.TP
172.BR \-a ", " \-\-all\-restart
173When zebra hangs or crashes, restart all daemons taking the following
174steps: (1) stop all other daemons, (2) restart zebra, and (3) start other
175daemons again.
176.IP
177Note that this option also requires
178.BR \-r ,
179.BR \-s ,
180and
181.B \-k
182options to be specified.
183.TP
184.BR \-A ", " \-\-always\-all\-restart
185When any daemon (i.e., not just zebra) hangs or crashes, restart all
186daemons taking the following steps: (1) stop all other daemons, (2) restart
187zebra, and (3) start other daemons again.
188.IP
189Note that this option also requires
190.BR \-r ,
191.BR \-s ,
192and
193.B \-k
194options to be specified.
195.TP
196.BI \-p " filename" "\fR, \fB\-\-pid\-file " filename
197Set the process identifier
198.I filename
199(the default value is "/var/run/quagga/watchquagga.pid").
200.TP
201.BI \-b " string" "\fR, \fB\-\-blank\-string " string
202When the supplied
203.I string
204is found in any of the command line option arguments (i.e.,
205.BR \-r ,
206.BR \-s ,
207.BR \-k ,
208or
209.BR \-R ),
210replace it with a space.
211.IP
212This is an ugly hack to circumvent problems with passing the command line
213arguments containing embedded spaces.
214.TP
215.BR \-v ", " \-\-version
216Display the version information and exit.
217.TP
218.BR \-h ", " \-\-help
219Display the usage information and exit.
220.SH SEE ALSO
221.BR zebra (8),
222.BR bgpd (8),
223.BR isisd (8),
224.BR ospfd (8),
225.BR ospf6d (8),
226.BR ripd (8),
227.BR ripngd (8)
228.PP
229See the project homepage at <http://www.quagga.net/>.
230.SH AUTHORS
231Copyright 2004 Andrew J. Schorr