]> git.proxmox.com Git - mirror_frr.git/blame - doc/manpages/frr-watchfrr.rst
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else
[mirror_frr.git] / doc / manpages / frr-watchfrr.rst
CommitLineData
a1e276e1
QY
1********
2WATCHFRR
3********
4
12b7724f 5.. include:: defines.rst
a1e276e1
QY
6.. |DAEMON| replace:: watchfrr
7
8SYNOPSIS
9========
10|DAEMON| |synopsis-options-hv|
11
12|DAEMON| [option...] <daemon>...
13
14
15DESCRIPTION
16===========
17|DAEMON| is a watchdog program that monitors the status of supplied frr daemons and tries to restart them in case they become unresponsive or shut down.
18
19To determine whether a daemon is running, it tries to connect to the daemon's VTY UNIX stream socket, and send echo commands to ensure the daemon responds. When the daemon crashes, EOF is received from the socket, so that |DAEMON| can react immediately.
20
21In order 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).
22
23OPTIONS
24=======
a1e276e1
QY
25
26.. option:: --dry
27
28 Run |DAEMON| in "dry-run" mode, only monitoring the specified daemons but not performing any start/stop/restart actions.
29
30.. option:: -d, --daemon
31
32 Run in daemon mode. When supplied, error messages are sent to Syslog instead of standard output (stdout).
33
34.. option:: -S <directory>, --statedir <directory>
35
36 Set the VTY socket directory (the default value is "/var/run/frr").
37
aa01fe3f
DL
38.. option:: -N <name>, --pathspace <name>
39
40 Insert the given name into paths used by the FRR daemons. This is appended
41 to the VTY socket directory and passed to the daemons which also add it to
42 their paths in /etc.
43
44.. option:: --netns[=<name>]
45
46 (Linux only.) Switch network namespaces when starting watchfrr. The name
47 defaults to the value passed with -N (which it should be used in conjunction
48 with.) If the name is not specified, the option has no effect.
49
50 If the network namespace does not exist, it is created in a manner
51 compatible with iproute2. Network namespaces are not removed by FRR, this
52 must be done with "ip netns delete".
53
a1e276e1
QY
54.. option:: -l <level>, --loglevel <level>
55
56 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.
57
58.. option:: --min-restart-interval <number>
59
60 Set the minimum number of seconds to wait between invocations of the daemon restart commands (the default value is "60").
61
62.. option:: --max-restart-interval <number>
63
64 Set the maximum number of seconds to wait between invocations of the daemon restart commands (the default value is "600").
65
66.. option:: -i <number>, --interval <number>
67
68 Set the status polling interval in seconds (the default value is "5").
69
70.. option:: -t <number>, --timeout <number>
71
72 Set the unresponsiveness timeout in seconds (the default value is "10").
73
74.. option:: -T <number>, --restart-timeout <number>
75
76 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.
77
78.. option:: -p <filename>, --pid-file <filename>
79
80 Set the process identifier filename (the default value is "/var/run/frr/|DAEMON|.pid").
81
82.. option:: -b <string>, --blank-string <string>
83
84 When the supplied string is found in any of the command line option arguments (i.e., -r, -s, or -k), replace it with a space.
85
86 This is an ugly hack to circumvent problems with passing the command line arguments containing embedded spaces.
87
88.. option:: -v, --version
89
90 Display the version information and exit.
91
92.. option:: -h, --help
93
94 Display the usage information and exit.
95
bd2893d5
DL
96The following 3 options specify scripts that |DAEMON| uses to perform start/stop/restart actions. Reasonable default values are built into watchfrr, so the use of these options should no longer be necessary:
97
98.. option:: -s command, --start-command command
99
100 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.
101
102.. option:: -k command, --kill-command command
103
104 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.
105
106.. option:: -r command, --restart command
107
108 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.
109
a1e276e1
QY
110PREVIOUS OPTIONS
111================
112Prior versions of |DAEMON| supported some additional options that no longer exist:::
113
114 -a, -A, -e, -R, -z
115
116The ``-a``, ``-A`` and ``-R`` options were used to select alternate monitoring modes that offered different patterns of restarting daemons. The "correct" mode (phased restart) is now the default. The -e and -z options used to disable some monitoring aspects, |DAEMON| now always has all monitoring features enabled.
117
118Removing these options should result in correct operation, if it does not please file a bug report.
119
120FILES
121=====
122
123|INSTALL_PREFIX_SBIN|/|DAEMON|
124 The default location of the |DAEMON| binary.
125
126|INSTALL_PREFIX_ETC|/|DAEMON|.conf
127 The default location of the |DAEMON| config file.
128
129$(PWD)/|DAEMON|.log
130 If the |DAEMON| process is configured to output logs to a file, then you
131 will find this file in the directory where you started |DAEMON|.
132
133.. include:: epilogue.rst
134