[ previous ] [ next ] [ threads ]
 
 From:  Dirk-Willem van Gulik <dirkx at webweaving dot org>
 To:  Manuel Kasper <mk at neon1 dot net>
 Cc:  Fabrizio Fioravanti <fabrizio dot fioravanti at finsystem dot net>, m0n0wall at lists dot m0n0 dot ch
 Subject:  Re: [m0n0wall] Net45xx image without watchdog
 Date:  Tue, 30 Dec 2003 09:45:01 -0800 (PST)
Yes, thanks for the question - but the answer is no; if the _HARDWARE_
does not support this type of watchdog, evidenced by the presense of
/dev/elan-mmcr and the fact that the uid can open it RW - then the code
will exit and/or do nothing.

See
http://wleiden.webweaving.org:8080/svn/node-config/factory/trunk/soekris/watchdog/watchdogd.c
or
http://wleiden.webweaving.org:8080/svn/node-config/factory/trunk/soekris/watchdog/watchdogd.8
or

Dw.


On Tue, 30 Dec 2003, Dirk-Willem van Gulik wrote:

>
>
> On Tue, 30 Dec 2003, Manuel Kasper wrote:
>
> > support for it from the kernel as well) unless your hardware is somehow
> > broken and the watchdog cannot be disabled once it has been enabled (works
> > fine for me though), and as I said, the next release will have watchdogd
>
> No the code does an
>
> 	signal-handler
> 		disable-watchdog
> 		exit
> 	enable watchdog
> 	while(1) {
> 		kick wathdog
> 		sleep ..
> 	}
>
> so if you do not start it -> no watchdog. If you kill it normal, no
> watchdog. A kill -9  is different of course.
>
> Dw.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: m0n0wall dash unsubscribe at lists dot m0n0 dot ch
> For additional commands, e-mail: m0n0wall dash help at lists dot m0n0 dot ch
>
WATCHDOGD(8)              BSD System Manager's Manual
WATCHDOGD(8)

NAME
     watchdogd - watchdogd for elan-mmcr/soekris machines

SYNOPSIS
     watchdogd

DESCRIPTION
     The watchdogd deamon runs in the background and will reset the
hardware
     watchdog timer of the elan-mmcr/soekris every 16 seconds. If this
timer
     is not reset within 32 seconds thereafter the hardware will reboot.

     The idea behind this is that when kernel or userland grinds to a halt
for
     such long periods; the machine has become unstable and the hardware
     should be rebooted.

     A SIGTERM (i.e. a normal kill, see kill(1) ) will disable the
watchdog
     timer and then shut down the deamon.

     A rude SIGKILL (i.e. a kill -9) will terminate the watchdogd but
leave
     the watchdog running. The machine will therefore be rebooted when the
     watchdog triggers; 15 to 30 seconds later.

     Events are logged to Syslog; the ident is watchdogd and the facility
is
     LOG_DEAMON.

     Each reset will be logged on LOG_INFO level to syslog(3) and failures
at
     LOG_CRIT. Start and stop are logged at LOG_CRIT level.

     The watchdogd utility takes no arguments.

TESTING THE WATCHDOG
     An effective way to test the watchdog is the following command
sequence:
     watchdog; mount -aur; kill -9 `cat /var/run/watchdogd.pid`. This will
     start the watchdog; umount all your file systems (to avoid damage)
and
     then rudely kill the watchdog.

FILES
     /dev/elan-mmrc, /var/run/watchdogd.pid

SEE ALSO
     elan-mmcr(4) syslog(3)

EXTRNAL REFERENCE
     Elan(tm) SC520 Microcontroller Watchdog Timer CodeKit Software, v1.0
     October 4, 1999 by AMD Embedded Processor Division:

http://www.amd.com/epd/desiging/codekits/4.series3/34.ck0034wat/50.ck003400/readme.pdf


ACKNOWLEDGMENTS
     Poul-Henning Kamp wrote the elan-mmcr(4) kernel driver, watchdog code
and
     the sample on which this code is based. Dirk-Willem van Gulik thus
     inpsired simply wrote a small deamon and man page for it.