1FRR-WATCHFRR(8) FRR FRR-WATCHFRR(8)
2
3
4
6 frr-watchfrr - a program to monitor the status of FRRouting daemons
7
9 watchfrr [-h] [-v]
10
11 watchfrr [option...] <daemon>...
12
14 watchfrr is a watchdog program that monitors the status of supplied frr
15 daemons and tries to restart them in case they become unresponsive or
16 shut down.
17
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
21 socket, so that watchfrr can react immediately.
22
23 In order to avoid restarting the daemons in quick succession, you can
24 supply the -m and -M options to set the minimum and maximum delay be‐
25 tween the restart commands. The minimum restart delay is recalculated
26 each time a restart is attempted. If the time since the last restart
27 attempt exceeds twice the value of -M, the restart delay is set to the
28 value of -m, otherwise the interval is doubled (but capped at the value
29 of -M).
30
32 --dry Run watchfrr in "dry-run" mode, only monitoring the specified
33 daemons but not performing any start/stop/restart actions.
34
35 -d, --daemon
36 Run in daemon mode. When supplied, error messages are sent to
37 Syslog instead of standard output (stdout).
38
39 -S <directory>, --statedir <directory>
40 Set the VTY socket directory (the default value is
41 "/var/run/frr").
42
43 -N <name>, --pathspace <name>
44 Insert the given name into paths used by the FRR daemons. This
45 is appended to the VTY socket directory and passed to the dae‐
46 mons which also add it to their paths in /etc.
47
48 --netns[=<name>]
49 (Linux only.) Switch network namespaces when starting watchfrr.
50 The name defaults to the value passed with -N (which it should
51 be used in conjunction with.) If the name is not specified, the
52 option has no effect.
53
54 If the network namespace does not exist, it is created in a man‐
55 ner compatible with iproute2. Network namespaces are not re‐
56 moved by FRR, this must be done with "ip netns delete".
57
58 -l <level>, --loglevel <level>
59 Set the logging level (the default value is "6"). The value
60 should range from 0 (LOG_EMERG) to 7 (LOG_DEBUG), but higher
61 number can be supplied if extra debugging messages are required.
62
63 --min-restart-interval <number>
64 Set the minimum number of seconds to wait between invocations of
65 the daemon restart commands (the default value is "60").
66
67 --max-restart-interval <number>
68 Set the maximum number of seconds to wait between invocations of
69 the daemon restart commands (the default value is "600").
70
71 -i <number>, --interval <number>
72 Set the status polling interval in seconds (the default value is
73 "5").
74
75 -t <number>, --timeout <number>
76 Set the unresponsiveness timeout in seconds (the default value
77 is "10").
78
79 -T <number>, --restart-timeout <number>
80 Set the restart (kill) timeout in seconds (the default value is
81 "20"). If any background jobs are still running after this pe‐
82 riod has elapsed, they will be killed.
83
84 -p <filename>, --pid-file <filename>
85 Set the process identifier filename (the default value is
86 "/var/run/frr/watchfrr.pid").
87
88 -b <string>, --blank-string <string>
89 When the supplied string is found in any of the command line op‐
90 tion arguments (i.e., -r, -s, or -k), replace it with a space.
91
92 This is an ugly hack to circumvent problems with passing the
93 command line arguments containing embedded spaces.
94
95 -v, --version
96 Display the version information and exit.
97
98 -h, --help
99 Display the usage information and exit.
100
101 The following 3 options specify scripts that watchfrr uses to perform
102 start/stop/restart actions. Reasonable default values are built into
103 watchfrr, so the use of these options should no longer be necessary:
104
105 -s command, --start-command command
106 Supply a Bourne shell command to start a single daemon. The com‐
107 mand string should contain the '%s' placeholder to be substi‐
108 tuted with the daemon name.
109
110 -k command, --kill-command command
111 Supply a Bourne shell command to stop a single daemon. The com‐
112 mand string should contain the '%s' placeholder to be substi‐
113 tuted with the daemon name.
114
115 -r command, --restart command
116 Supply a Bourne shell command to restart a single daemon. The
117 command string should contain the '%s' placeholder to be substi‐
118 tuted with the daemon name.
119
121 Prior versions of watchfrr supported some additional options that no
122 longer exist::
123
124 -a, -A, -e, -R, -z
125
126 The -a, -A and -R options were used to select alternate monitoring
127 modes that offered different patterns of restarting daemons. The "cor‐
128 rect" mode (phased restart) is now the default. The -e and -z options
129 used to disable some monitoring aspects, watchfrr now always has all
130 monitoring features enabled.
131
132 Removing these options should result in correct operation, if it does
133 not please file a bug report.
134
136 /usr/lib/frr/watchfrr
137 The default location of the watchfrr binary.
138
139 /etc/frr/watchfrr.conf
140 The default location of the watchfrr config file.
141
142 $(PWD)/watchfrr.log
143 If the watchfrr process is configured to output logs to a file,
144 then you will find this file in the directory where you started
145 watchfrr.
146
148 This man page is intended to be a quick reference for command line op‐
149 tions. The definitive document is the info file frr 7.5.1 or the docu‐
150 mentation available on the project website at https://frrouting.org/.
151
153 The daemon may log to standard output, to a VTY, to a log file, or
154 through syslog to the system logs. FRR supports many debugging options,
155 see the Info file, web docs or source for details.
156
158 frr-zebra(8), vtysh(1), frr-ripd(8), frr-ripngd(8), frr-ospfd(8),
159 frr-ospf6d(8), frr-bgpd(8), frr-isisd(8), frr-babeld(8), frr-nhrpd(8),
160 frr-pimd(8), frr-pbrd(8), frr-ldpd(8), frr-eigrpd(8), frr-staticd(8),
161 frr-fabricd(8), frr-vrrpd(8), mtracebis(8) https://frrouting.org/
162
164 FRR eats bugs for breakfast. If you have food for the maintainers,
165 please email <dev@lists.frrouting.org>.
166
168 2021, FRR
169
170
171
172
1737.5.1 Aug 04, 2021 FRR-WATCHFRR(8)