>
> On Wed, Mar 28, 2007 at 03:57:18PM -0400, Tuc at T-B-O-H.NET wrote:
> > Like :
> >
> > watchdogd -s 15 -t 120
> >
> > it should be operating correctly. But about 10 hours in,
> > it seems the system was still operational within 5 seconds of
> > the time it rebooted. I've now changed it to :
> >
> > watchdogd -s 120 -t 1200
> >
> > and will see if it "misfires".
> Given the fact that the manpage for watchdog states that the default is
> 1 second, why do you want such long sleep times?
>
Two reasons, atleast in my mind. First is that there is a
CF in there, and don't want to burn up the read cycles having it
do a stat of /etc every second. Second is that I just wanted to
give it a WIDE berth. It may not be the 30(timeout) to 1(sleep)
that the default is, but if a process running with a 2 minute
sleep takes over 20 minutes to execute.... Theres a problem.
>
> Also, the man page says that "If -e cmd is not specified, the daemon
> will perform a trivial file system check instead." - maybe this
> filesystem check is not successful on the soekris?
>
I threw myself for quite a curve with that at first. I
interpreted it as a "last chance" effort to reset the counter.
Its not. I was putting "-e 'logger I'm gonna hurl'" and it was
resetting constantly. Turns out it EXECUTES the command and then
does the sleep cycle, executes it and sleeps, etc. I also was
a bit freaked when I heard "file system check" as in fsck! I
was concerned this was going to really burn up the CF. Turns
out that the code actually just does a "stat /etc". While
not terrible, I still didn't feel like doing it every second
burning the CF reads. If a stat /etc fails, you have some
SERIOUS issues!
>
> Anyway, on linux I never had any problems with the watchdog, so I assume
> that the hardware watchdog works.
>
I would think the FreeBSD one works too. Poul-Henning Kamp
worked on it, and I know he's an active participant here. Besides,
when it comes down to it, theres really not much for it to do...
Arm it, execute the "stat /etc", if its ok poke the timer, sleep.
while (end_program == 0) {
failed = 0;
if (test_cmd != NULL)
failed = system(test_cmd);
else
failed = stat("/etc", &sb);
if (failed == 0)
watchdog_patpat();
sleep(nap);
}
int
watchdog_patpat(void)
{
return ioctl(fd, WDIOCPATPAT, &timeout);
}
Tuc
_______________________________________________
Soekris-tech mailing list
[email protected]
http://lists.soekris.com/mailman/listinfo/soekris-tech