aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/watchdogd
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-11-16 09:44:30 +0000
committerXin LI <delphij@FreeBSD.org>2014-11-16 09:44:30 +0000
commitdad6df61248be53709dbb62f267c120fbca73652 (patch)
treef60239e7d4bbd25ad2cac0ea260d966f7d2b03b4 /usr.sbin/watchdogd
parentf1bcbd4abae7fb842edf5fac2d7262cc3cccd106 (diff)
downloadsrc-dad6df61248be53709dbb62f267c120fbca73652.tar.gz
src-dad6df61248be53709dbb62f267c120fbca73652.zip
Default to use 10 seconds as nap interval instead of 1.
Previously, we have a nap interval of 1 second while we have a timeout of 128 seconds by default, which could be an overkill, and for some hardware the patting action may be expensive. Note that the choice of nap interval is still arbitrary. We preferred a safe value where even when the system is very heavily loaded, the watchdog should not shoot the system down if it's not really hung. According to the manual page of Linux's watchdog daemon, the nap interval time of theirs is 10 seconds, which seems to be a reasonable value -- according to Intel documentation AP-725 (Document Number: 292273-001), ICH5's maximum timeout is about 37.5 seconds, which the ichwd(4) driver would set when we requested 128 seconds (although it should probably feed back this as an error and do not set the timeout). Since that's the shortest maximum value, 10 seconds seems to be a right choice for us too. Discussed with: alfred MFC after: 1 month
Notes
Notes: svn path=/head/; revision=274583
Diffstat (limited to 'usr.sbin/watchdogd')
-rw-r--r--usr.sbin/watchdogd/watchdogd.84
-rw-r--r--usr.sbin/watchdogd/watchdogd.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/watchdogd/watchdogd.8 b/usr.sbin/watchdogd/watchdogd.8
index aa2888562641..e60f42db934b 100644
--- a/usr.sbin/watchdogd/watchdogd.8
+++ b/usr.sbin/watchdogd/watchdogd.8
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 18, 2014
+.Dd November 16, 2014
.Dt WATCHDOGD 8
.Os
.Sh NAME
@@ -79,7 +79,7 @@ reboot if there are problems with the script.
The
.Fl s Ar sleep
argument can be used to control the sleep period between each execution
-of the check and defaults to one second.
+of the check and defaults to 10 seconds.
.Pp
The
.Fl t Ar timeout
diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c
index 5fd16f56964b..767aa8e6f690 100644
--- a/usr.sbin/watchdogd/watchdogd.c
+++ b/usr.sbin/watchdogd/watchdogd.c
@@ -87,7 +87,7 @@ static int is_dry_run = 0; /* do not arm the watchdog, only
static int do_timedog = 0;
static int do_syslog = 1;
static int fd = -1;
-static int nap = 1;
+static int nap = 10;
static int carp_thresh_seconds = -1;
static char *test_cmd = NULL;