1 .\" This file was originally generated by help2man 1.36.
2 .TH WATCHQUAGGA 8 "July 2010"
4 watchquagga \- a program to monitor the status of quagga daemons
14 is a watchdog program that monitors the status of supplied quagga
16 and tries to restart them in case they become unresponsive or shut down.
18 To determine whether a daemon is running, it tries to connect to the
19 daemon's VTY UNIX stream socket, and send echo commands to ensure the
20 daemon responds. When the daemon crashes, EOF is received from the socket,
21 so that watchquagga can react immediately.
23 This program can run in one of the following 5 modes:
26 In this mode, the program serves as a monitor and reports status changes.
28 Example usage: watchquagga \-d zebra ospfd bgpd
30 .B Mode 1: global restart
31 In this mode, whenever a daemon hangs or crashes, the given command is used
32 to restart all watched daemons.
34 Example usage: watchquagga \-dz \e
36 -R '/sbin/service zebra restart; /sbin/service ospfd restart' \e
40 .B Mode 2: individual daemon restart
41 In this mode, whenever a single daemon hangs or crashes, the given command
42 is used to restart this daemon only.
44 Example usage: watchquagga \-dz \-r '/sbin/service %s restart' \e
48 .B Mode 3: phased zebra restart
49 In this mode, whenever a single daemon hangs or crashes, the given command
50 is used to restart this daemon only. The only exception is the zebra
51 daemon; in this case, the following steps are taken: (1) all other daemons
52 are stopped, (2) zebra is restarted, and (3) other daemons are started
55 Example usage: watchquagga \-adz \-r '/sbin/service %s restart' \e
57 \-s '/sbin/service %s start' \e
59 \-k '/sbin/service %s stop' zebra ospfd bgpd
61 .B Mode 4: phased global restart for any failure
62 In this mode, whenever a single daemon hangs or crashes, the following
63 steps are taken: (1) all other daemons are stopped, (2) zebra is restarted,
64 and (3) other daemons are started again.
66 Example usage: watchquagga \-Adz \-r '/sbin/service %s restart' \e
68 \-s '/sbin/service %s start' \e
70 \-k '/sbin/service %s stop' zebra ospfd bgpd
72 Important: It is believed that mode 2 (individual daemon restart) is not
73 safe, and mode 3 (phased zebra restart) may not be safe with certain
76 In order to avoid restarting the daemons in quick succession, you can
81 options to set the minimum and maximum delay between the restart commands.
82 The minimum restart delay is recalculated each time a restart is attempted.
83 If the time since the last restart attempt exceeds twice the value of
85 the restart delay is set to the value of
87 otherwise the interval is doubled (but capped at the value of
91 .BR \-d ", " \-\-daemon
92 Run in daemon mode. When supplied, error messages are sent to Syslog
93 instead of standard output (stdout).
95 .BI \-S " directory" "\fR, \fB\-\-statedir " directory
98 (the default value is "/var/run/quagga").
100 .BR \-e ", " \-\-no\-echo
101 Do not ping the daemons to test whether they respond. This option is
102 necessary if one or more daemons do not support the echo command.
104 .BI \-l " level" "\fR, \fB\-\-loglevel " 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
111 .BI \-m " number" "\fR, \fB\-\-min\-restart\-interval " number
114 of seconds to wait between invocations of the daemon restart commands (the
115 default value is "60").
117 .BI \-M " number" "\fR, \fB\-\-max\-restart\-interval " number
120 of seconds to wait between invocations of the daemon restart commands (the
121 default value is "600").
123 .BI \-i " number" "\fR, \fB\-\-interval " number
124 Set the status polling interval in seconds (the default value is "5").
126 .BI \-t " number" "\fR, \fB\-\-timeout " number
127 Set the unresponsiveness timeout in seconds (the default value is "10").
129 .BI \-T " number" "\fR, \fB\-\-restart\-timeout " number
130 Set the restart (kill) timeout in seconds (the default value is "20"). If
131 any background jobs are still running after this period has elapsed, they
134 .BI \-r " command" "\fR, \fB\-\-restart " command
135 Supply a Bourne shell
137 to restart a single daemon. The command string should contain the '%s'
138 placeholder to be substituted with the daemon name.
144 options are not compatible.
146 .BI \-s " command" "\fR, \fB\-\-start\-command " command
147 Supply a Bourne shell
149 to start a single daemon. The command string should contain the '%s'
150 placeholder to be substituted with the daemon name.
152 .BI \-k " command" "\fR, \fB\-\-kill\-command " command
153 Supply a Bourne shell
155 to stop a single daemon. The command string should contain the '%s'
156 placeholder to be substituted with the daemon name.
158 .BR \-R ", " \-\-restart\-all
159 When one or more daemons are shut down, try to restart them using the
160 Bourne shell command supplied on the command line.
166 options are not compatible.
168 .BR \-z ", " \-\-unresponsive\-restart
169 When a daemon is in an unresponsive state, treat it as being shut down for
170 the restart purposes.
172 .BR \-a ", " \-\-all\-restart
173 When zebra hangs or crashes, restart all daemons taking the following
174 steps: (1) stop all other daemons, (2) restart zebra, and (3) start other
177 Note that this option also requires
182 options to be specified.
184 .BR \-A ", " \-\-always\-all\-restart
185 When any daemon (i.e., not just zebra) hangs or crashes, restart all
186 daemons taking the following steps: (1) stop all other daemons, (2) restart
187 zebra, and (3) start other daemons again.
189 Note that this option also requires
194 options to be specified.
196 .BI \-p " filename" "\fR, \fB\-\-pid\-file " filename
197 Set the process identifier
199 (the default value is "/var/run/quagga/watchquagga.pid").
201 .BI \-b " string" "\fR, \fB\-\-blank\-string " string
204 is found in any of the command line option arguments (i.e.,
210 replace it with a space.
212 This is an ugly hack to circumvent problems with passing the command line
213 arguments containing embedded spaces.
215 .BR \-v ", " \-\-version
216 Display the version information and exit.
218 .BR \-h ", " \-\-help
219 Display the usage information and exit.
229 See the project homepage at <http://www.quagga.net/>.
231 Copyright 2004 Andrew J. Schorr