Skip to content

netwatch.conf

Calin Crisan edited this page Sep 16, 2022 · 3 revisions

File Location And Role

The following paths are searched, in this order: /etc/netwatch.conf, /data/etc/netwatch.conf and /boot/netwatch.conf. Files that are present are used to source in options for configuring how various network-related parts of the system (such as services or network connectivity) are watched over.

File Format

This is a simple shell script that should contain only NAME="value" lines. The file is sourced by many init scripts.

Available Variables

LINK_WATCH

Enables or disables watching over the network links. Defaults to true.

LINK_WATCH_TIMEOUT

Determines the timeout, in seconds, after which a network link that goes down will cause a panic reboot. Defaults to 20.

IP_WATCH

Enables or disables a watch routine that makes sure all configured network interfaces have an IP address. Defaults to true.

IP_WATCH_TIMEOUT

Determines the timeout, in seconds, after which a network interface that has lost its IP address will cause a panic reboot. Defaults to 40.

GW_WATCH

Enables or disables a watch routine that makes sure the default gateway is set and is reachable. Defaults to false.

GW_WATCH_INTERVAL

Determines the interval, in seconds, at which the gateway watch test will be run. Defaults to 60.

GW_WATCH_RETRIES

Determines the number of retries in case of a gateway test failure, when using the gateway watch mechanism, after which the system will go into panic reboot. Defaults to 3.

NET_WATCH_HOST

When set, this variable determines the host used to test the TCP connectivity. When unset, the netwatch mechanism is disabled. This is unset by default.

NET_WATCH_PORT

Determines the destination TCP port to be used by the netwatch mechanism. This is unset by default.

NET_WATCH_RETRIES

Determines the number of retries in case of a TCP connection failure, when using the netwatch mechanism, after which the system will go into panic reboot. Defaults to 3.

NET_WATCH_DELAY

Determines the time, in seconds, to delay the first TCP connection check after boot. This prevents panic reboots due to network connection issues after a power outage. Defaults to 300.

NET_WATCH_TIMEOUT

Determines the timeout, in seconds, to wait for a successful TCP connection establishment, when using the netwatch mechanism. Defaults to 5.

NET_WATCH_INTERVAL

Determines the interval, in seconds, at which the netwatch test will be run. Defaults to 60.

Clone this wiki locally