WATCHQUAGGA(8)

๐Ÿ“ฆ version 1.2.4, in alpine 3.22, alpine 3.23, alpine 3.24

โœจ 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. ๐Ÿ‘‹
  • -S directory, --statedir directory โ€” 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. ๐Ÿ™ˆ
  • -l level, --loglevel level โ€” 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.
  • -m number, --min-restart-interval number โ€” set the minimum number of seconds to wait between invocations of the daemon restart commands (the default value is "60").
  • -M number, --max-restart-interval number โ€” set the maximum number of seconds to wait between invocations of the daemon restart commands (the default value is "600").
  • -i number, --interval number โ€” set the status polling interval in seconds (the default value is "5").
  • -t number, --timeout number โ€” set the unresponsiveness timeout in seconds (the default value is "10").
  • -T number, --restart-timeout number โ€” 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. ๐Ÿ’€
  • -r command, --restart command โ€” 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 -r and -R options are not compatible. bestie they're literally beefing. ๐Ÿ˜ญ
  • -s command, --start-command command โ€” 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.
  • -k command, --kill-command command โ€” 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 -r and -R options 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 -k options 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 -k options to be specified. same energy. ๐Ÿ’…
  • -p filename, --pid-file filename โ€” set the process identifier filename (the default value is "/var/run/quagga/watchquagga.pid").
  • -b string, --blank-string string โ€” 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