WATCHQUAGGA(8)
โจ WATCHQUAGGA(8) โจ
okay so bestie, welcome to the watchquagga(8) page โ System Manager's Manual energy, but make it group chat. this is literally the manual for watchquagga, and i'm gonna walk you through it like we're texting about it. ๐ซถ
๐ธ NAME ๐ธ
watchquagga โ a program to monitor the status of quagga daemons
โจ SYNOPSIS โจ
watchquagga [option...] daemon...
watchquagga -h | -v
๐ DESCRIPTION ๐
okay so watchquagga is literally a watchdog program that monitors the status of the quagga daemons you give it, and it tries to restart them if they go unresponsive or shut down. very main character behavior, honestly. ๐
to figure out whether a daemon is running, it tries to connect to the daemon's VTY UNIX stream socket, and sends echo commands to make sure the daemon actually responds. when the daemon crashes, EOF is received from the socket, so watchquagga can react immediately. no waiting around, periodt. ๐
this program can run in one of the following 5 modes:
๐ Mode 0: monitor
in this mode, the program is just a monitor and reports status changes.
example usage:
watchquagga -d zebra ospfd bgpd
๐ Mode 1: global restart
in this mode, whenever a daemon hangs or crashes, the given command is used to restart all watched daemons.
example usage:
watchquagga -dz \
-R '/sbin/service zebra restart; /sbin/service ospfd restart' \
zebra ospfd
๐ Mode 2: individual daemon restart
in this mode, whenever a single daemon hangs or crashes, the given command is used to restart this daemon only.
example usage:
watchquagga -dz -r '/sbin/service %s restart' \
zebra ospfd bgpd
๐ Mode 3: phased zebra restart
in this mode, whenever a single daemon hangs or crashes, the given command is used to restart this daemon only. the only exception is the zebra daemon; in this case, the following steps are taken: (1) all other daemons are stopped, (2) zebra is restarted, and (3) other daemons are started again.
example usage:
watchquagga -adz -r '/sbin/service %s restart' \
-s '/sbin/service %s start' \
-k '/sbin/service %s stop' zebra ospfd bgpd
๐ Mode 4: phased global restart for any failure
in this mode, whenever a single daemon hangs or crashes, the following steps are taken: (1) all other daemons are stopped, (2) zebra is restarted, and (3) other daemons are started again.
example usage:
watchquagga -Adz -r '/sbin/service %s restart' \
-s '/sbin/service %s start' \
-k '/sbin/service %s stop' zebra ospfd bgpd
โ ๏ธ important: it is believed that mode 2 (individual daemon restart) is not safe, and mode 3 (phased zebra restart) may not be safe with certain routing daemons. so likeโฆ proceed with caution, bestie. ๐ญ
so to avoid restarting the daemons in quick succession, you can supply the -m and -M options to set the minimum and maximum delay between the restart commands. the minimum restart delay is recalculated each time a restart is attempted. if the time since the last restart attempt exceeds twice the value of -M, the restart delay is set to the value of -m, otherwise the interval is doubled (but capped at the value of -M). math queen behavior, honestly. ๐งฎโจ
๐ OPTIONS ๐
-d,--daemonโ run in daemon mode. when supplied, error messages are sent to Syslog instead of standard output (stdout). bye stdout, hello syslog. ๐-Sdirectory,--statedirdirectory โ set the VTY socket directory (the default value is"/var/run/quagga").-e,--no-echoโ do not ping the daemons to test whether they respond. this option is necessary if one or more daemons do not support the echo command. some daemons are just built different, and that's okay. ๐-llevel,--loglevellevel โ set the logging level (the default value is"6"). the value should range from 0 (LOG_EMERG) to 7 (LOG_DEBUG), but higher number can be supplied if extra debugging messages are required.-mnumber,--min-restart-intervalnumber โ set the minimum number of seconds to wait between invocations of the daemon restart commands (the default value is"60").-Mnumber,--max-restart-intervalnumber โ set the maximum number of seconds to wait between invocations of the daemon restart commands (the default value is"600").-inumber,--intervalnumber โ set the status polling interval in seconds (the default value is"5").-tnumber,--timeoutnumber โ set the unresponsiveness timeout in seconds (the default value is"10").-Tnumber,--restart-timeoutnumber โ set the restart (kill) timeout in seconds (the default value is"20"). if any background jobs are still running after this period has elapsed, they will be killed. periodt. ๐-rcommand,--restartcommand โ supply a Bourne shell command to restart a single daemon. the command string should contain the'%s'placeholder to be substituted with the daemon name.
note that-rand-Roptions are not compatible. bestie they're literally beefing. ๐ญ
-scommand,--start-commandcommand โ supply a Bourne shell command to start a single daemon. the command string should contain the'%s'placeholder to be substituted with the daemon name.-kcommand,--kill-commandcommand โ supply a Bourne shell command to stop a single daemon. the command string should contain the'%s'placeholder to be substituted with the daemon name.-R,--restart-allโ when one or more daemons are shut down, try to restart them using the Bourne shell command supplied on the command line.
note that-rand-Roptions are not compatible. same beef, different restatement. ๐
-z,--unresponsive-restartโ when a daemon is in an unresponsive state, treat it as being shut down for the restart purposes.-a,--all-restartโ when zebra hangs or crashes, restart all daemons taking the following steps: (1) stop all other daemons, (2) restart zebra, and (3) start other daemons again.
note that this option also requires-r,-s, and-koptions to be specified. no shortcuts, bestie. โจ
-A,--always-all-restartโ when any daemon (i.e., not just zebra) hangs or crashes, restart all daemons taking the following steps: (1) stop all other daemons, (2) restart zebra, and (3) start other daemons again.
note that this option also requires-r,-s, and-koptions to be specified. same energy. ๐
-pfilename,--pid-filefilename โ set the process identifier filename (the default value is"/var/run/quagga/watchquagga.pid").-bstring,--blank-stringstring โ when the supplied string is found in any of the command line option arguments (i.e.,-r,-s,-k, or-R), replace it with a space.
this is an ugly hack to circumvent problems with passing the command line arguments containing embedded spaces. i said what i said. ๐
-v,--versionโ display the version information and exit.-h,--helpโ display the usage information and exit.
๐ฆ SEE ALSO ๐ฆ
zebra(8), bgpd(8), isisd(8), ospfd(8), ospf6d(8), ripd(8), ripngd(8)
see the project homepage at <http://www.quagga.net/>. tell 'em i sent you. ๐
๐ AUTHORS ๐
copyright 2004 Andrew J. Schorr
๐ sign-off ๐
and that's the whole manual, bestie! this was the watchquagga(8) page from July 2010, manual name WATCHQUAGGA, in case you were wondering. go forth and watch those daemons, you absolute icon. ๐ซถโจ๐
๐ฆ where this page comes from
- alpine 3.22: quagga-doc 1.2.4-r10 ยท GPL-2.0-or-later
- alpine 3.23: quagga-doc 1.2.4-r11 ยท GPL-2.0-or-later
- alpine 3.24: quagga-doc 1.2.4-r11 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms