Re: Software watchdog patch

2003-06-21 Thread Hiten Pandya
On Fri, Jun 20, 2003 at 09:47:07PM -0500, Sean Kelly wrote:
 Greetings.
 I look forward to any feedback, whether positive or negative.

Hello Sean, this stuff looks really promising.  Anyways, I
can't comment about the code as I have had no time to read it,
but here are a few mdoc nitpicks I did:

Index: share/man/man4/watchdog.4
===
+is implemented via a trio of sysctl OIDs. When
+.Va debug.watchdog.enabled

Hmm, the .Va should be replaced with .Li.  Also, it is necessary
to remove all hard sentence breaks, ie. instead of:

via a trio of sysctl OIDs.  When...

It should be:

via a trio of sysctl OIDs.
When...

Sysctls should be documented using .Li.

+.Sh SEE ALSO
+.Xr watchdogd 8 ,
+.Xr sysctl 8
+.Sh HISTORY

Manual pages are first ordered by their section numbers, and
then alphabetically, thus watchdogd(8)'s .Xr should be after
sysctl(8).

+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+code and man page were written by
+.An Sean Kelly Aq [EMAIL PROTECTED] .

Use `manual page' instead of `man page'.

Same sort of comments apply to the watchdogd(8) manual page.

Hope that helps.
Cheers.

-- Hiten ([EMAIL PROTECTED])
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Software watchdog patch

2003-06-21 Thread Sean Kelly
On Sat, Jun 21, 2003 at 06:33:41AM -0700, Hiten Pandya wrote:
 On Fri, Jun 20, 2003 at 09:47:07PM -0500, Sean Kelly wrote:
   Hello Sean, this stuff looks really promising.  Anyways, I
   can't comment about the code as I have had no time to read it,
   but here are a few mdoc nitpicks I did:

I believe I have cleaned up the mdoc issues you pointed out. The updated
patch is available at the same URL:
 http://www.sean-kelly.org/watchdog.diff

Thanks for the feedback.

-- 
Sean Kelly | PGP KeyID: D2E5E296
[EMAIL PROTECTED] | http://www.zombie.org


pgp0.pgp
Description: PGP signature


Software watchdog patch

2003-06-20 Thread Sean Kelly
Greetings.

I've been working on a patch which adds software watchdog to the FreeBSD
5.1-CURRENT kernel. Below is an URL to the patch to my work, and I'd
appreciate it if anybody interested in this venture would give me their
feedback on what I've got and also help debug it.

The patch is available here: http://www.sean-kelly.org/watchdog.diff

My watchdog patch is two pieces. One half is a kernel patch which adds the
watchdog timer checker to hardclock() in sys/kern/kern_clock.c. It also
adds a watchdog_fire() function which performs various things on a watchdog
timeout.

The userland half of the patch adds a watchdogd daemon which periodically
wakes up from a sleep to notify the kernel that the userland is still
intact.

This patch also adds a watchdogd(8) manpage, a watchdog(4) manpage, and an
/etc/rc.d/watchdogd startup script.

In order to utilize the watchdog, you must build a kernel with
 options WATCHDOG

It is also advised that you enable watchdogd to /etc/rc.conf:
 watchdogd_enable=YES


Three new sysctls are added:
   debug.watchdog.enabled
  When this is non-zero, the watchdog is active and hardclock() is
  verifying that the watchdog timer has not timed out.

   debug.watchdog.timeout: 20
  This is the number of seconds the watchdog can go without a timer
  update.

   debug.watchdog.reset: 0
  When this sysctl is touched (read/write), it resets the
  watchdog_ticks kernel variable to the value of ticks. When
  (ticks - watchdog_ticks)  watchdog.timeout seconds, the watchdog
  fires by calling watchdog_fire().

When the watchdog fires (watchdog_fire()), different things happen
depending on the kernel configuration. First, interrupt counts are dumped
to the console. Then, if your kernel was built with DDB support, you will
get a backtrace and be dropped to the DDB prompt. If your kernel has no DDB
support, your kernel will panic and presumably reboot itself.

Note that I attempted to stick to style(9). If I did not, please point out
my mistakes and I'll be happy to fix them. Also note that this is my first
venture writing manpages from scratch, so feel free to tear them apart and
mock me. However, I did read mdoc(7) and check them for warnings.

I look forward to any feedback, whether positive or negative.

-- 
Sean Kelly | PGP KeyID: D2E5E296
[EMAIL PROTECTED] | http://www.zombie.org


pgp0.pgp
Description: PGP signature