History log of /freebsd-10.1-release/usr.sbin/watchdogd/
Revision Date Author Comments
272461 03-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


254173 10-Aug-2013 alfred

Fix bug in r253719: fix command line watchdog disable.

r253719 disallowed watchdog(8) from disabling the watchdog
by breaking the ability to pass 0 as a timeout arg. Fix this.


253808 30-Jul-2013 jhb

Apply a casting sledgehammer.

Submitted by: dhw


253744 28-Jul-2013 ian

Fix printf of seconds for systems where time_t is 64 bits.


253735 28-Jul-2013 joel

mdoc and language improvements.


253723 27-Jul-2013 alfred

Provide some examples for watchdogd usage.


253719 27-Jul-2013 alfred

Fix watchdog pretimeout.

The original API calls for pow2ns, however the new APIs from
Linux call for seconds.

We need to be able to convert to/from 2^Nns to seconds in both
userland and kernel to fix this and properly compare units.


249245 08-Apr-2013 ed

Mark the act_tbl static/const.

This table is only used within this source file and is only accessed
read-only.

MFC after: 1 week


248744 26-Mar-2013 markj

Invert the meaning of -S (added in r247405) and document its meaning. Also,
don't carp about the watchdog command taking too long until after the
watchdog has been patted, and don't carp via warnx(3) unless -S is set
since syslog(3) already logs to standard error otherwise.

Discussed with: alfred
Reviewed by: alfred
Approved by: emaste (co-mentor)


247417 27-Feb-2013 joel

Remove EOL whitespace.


247416 27-Feb-2013 joel

mdoc: begin sentence on new line.


247405 27-Feb-2013 alfred

watchdogd(8) and watchdog(4) enhancements.

The following support was added to watchdog(4):
- Support to query the outstanding timeout.
- Support to set a software pre-timeout function watchdog with an 'action'
- Support to set a software only watchdog with a configurable 'action'

'action' can be a mask specifying a single operation or a combination of:
log(9), printf(9), panic(9) and/or kdb_enter(9).

Support the following in watchdogged:
- Support to utilize the new additions to watchdog(4).
- Support to warn if a watchdog script runs for too long.
- Support for "dry run" where we do not actually arm the watchdog,
but only report on our timing.

Sponsored by: iXsystems, Inc.
MFC after: 1 month


245951 26-Jan-2013 ian

Revert accidental regression to previous misspelling.

Approved by: cognet (mentor)


245949 26-Jan-2013 ian

Reduce watchdogd's memory footprint when running daemonized.

This uses the recently-added jemalloc(3) feature of setting the lg_chunk
tuning option to zero to request that memory be allocated in the smallest
chunks possible. Without this option, the default is to initally map 8MB,
and then the mlockall() call wires that entire allocation even though the
program only uses a few Kbytes of it at runtime.

PR: bin/173332
Approved by: cognet (mentor)


245584 18-Jan-2013 alfred

Spelling: exitting -> exiting

MFC after: 2 weeks


242519 03-Nov-2012 delphij

Replace log(3) with flsll(3) for watchdogd(8) and drop libm dependency.

MFC after: 2 weeks


239896 30-Aug-2012 zont

- It's also need to lock current memory.

Approved by: kib (mentor)
MFC after: 1 week


239769 28-Aug-2012 zont

- Don't allow watchdogd(8) to be swapped out.
On machines with huge amount of swap and high IO activity,
watchdogd(8) may wait for a swap memory longer than timeout and
sometimes fires.

Approved by: kib (mentor)
MFC after: 1 week


213181 26-Sep-2010 emaste

Protect the watchdog daemon against swap OOM killer. This is similar to
SVN r199804 which added protection to sshd, cron, syslogd, and inetd.


210300 20-Jul-2010 delphij

Staticify local variables.

While I'm there also add a 'static' keyword for a function to make it
consistent with prototype.

Reviewed by: phk
MFC after: 3 months


201390 02-Jan-2010 ed

The last big commit: let usr.sbin/ use WARNS=6 by default.


201227 29-Dec-2009 ed

ANSIfy almost all applications that use WARNS=6.

I was considering committing all these patches one by one, but as
discussed with brooks@, there is no need to do this. If we ever
need/want to merge these changes back, it is still possible to do this
per application.


200778 21-Dec-2009 ru

Don't hide an error if the initial attempt to program a watchdog from
within watchdogd(8) fails. This is also consistent with watchdog(8).


165263 15-Dec-2006 n_hibma

Don't exit from watchdogd on receiving a signal if we cannot stop the watchdog.
That'll require -KILL. This avoids resetting your system on one of the
watchdogs that you cannot disable.


162806 29-Sep-2006 ru

Markup fixes.


161862 02-Sep-2006 phk

Document that the default timeout is 16 seconds


156334 06-Mar-2006 phk

Fix usage().

Submitted by: Adrian Steinmann <ast@marabu.ch>


150747 30-Sep-2005 phk

Report any errors we might see when disabling the watchdog.

Complain about extra arguments so people don't get surprised
if they type "watchdog 0"


150214 16-Sep-2005 pjd

Pidfiles should be created with permission preventing users from opening
them for reading. When user can open file for reading, he can also
flock(2) it, which can lead to confusions.

Pointed out by: green


149434 24-Aug-2005 pjd

Use pidfile(3) in watchdogd(8).


143831 19-Mar-2005 marius

When disarming a watchdog by using an interval of WD_TO_NEVER a non-zero
return value of the ioctl doesn't indicate that the command has failed
so don't let watchdog(8) return an error in this case.

MFC after: 3 days


140442 18-Jan-2005 ru

Sort sections.


132809 28-Jul-2004 green

Disable memory locking that could keep watchdogd from deadlocking itself
if the swap subsystem failed.

Requested by: phk


132581 23-Jul-2004 green

Now that mlockall(2) is unbroken, use it to keep watchdogd(8) permanently
out of swap.


131754 07-Jul-2004 ru

mdoc(7) fixes.


130454 14-Jun-2004 phk

Document -d flag


130420 13-Jun-2004 ru

Assorted markup, grammar, and spelling fixes.


128898 03-May-2004 smkelly

Bump the copyright year since I forgot last time.


128705 28-Apr-2004 smkelly

Update comments to reflect changes made by phk. Also no longer need
<sys/sysctl.h>.


128644 25-Apr-2004 simon

mdoc(7) janitor:
- Sort SEE ALSO by section number.
- Remove redundant ','.


128643 25-Apr-2004 simon

mdoc(7) janitor:
- Remove EOL whitespace.
- Expand contracted words.
- Correct usage of .Fl macro.
- Use complete argument to -width.
- Remove redundant ','.


126383 28-Feb-2004 phk

Rename the WATCHDOG option to SW_WATCHDOG and make it use the
generic watchdoc(9) interface.

Make watchdogd(8) perform as watchdog(8) as well, and make it
possible to specify a check command to run, timeout and sleep
periods.

Update watchdog(4) to talk about the generic interface and add
new watchdog(8) page.


126178 23-Feb-2004 johan

style.Makefile(5):
Use WARNS?= instead of WARNS=.


117185 03-Jul-2003 smkelly

o style(9) fixes
- Reordered #includes
- Only include <sys/types.h>, not it and <sys/cdefs.h>
o style.Makefile(5) fixes
- No SRCS= line when only one src file with same name as program
o Use warn()/errx() instead of fprintf()
- Integrated patch from Philippe Charnier <charnier@xp11.frmug.org>

Approved by: jeff (mentor)


116888 26-Jun-2003 smkelly

Unbreak this for alpha and friends.

Double pointy hat to me, or something.


116880 26-Jun-2003 maxim

o Fix typo.

Submitted by: smkelly


116874 26-Jun-2003 smkelly

- Add a software watchdog facility.

This commit has two pieces. One half is the watchdog kernel code which lives
primarily in hardclock() in sys/kern/kern_clock.c. The other half is a userland
daemon which, when run, will keep the watchdog from firing while the userland
is intact and functioning.

Approved by: jeff (mentor)