From: Iain Buchanan <iaindb@netspace.net.au>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Emergency shutdown, how to?
Date: Tue, 08 Apr 2008 08:59:42 +0930 [thread overview]
Message-ID: <1207610982.15340.50.camel@orpheus> (raw)
In-Reply-To: <47FA59DA.9090404@wrkhors.com>
On Mon, 2008-04-07 at 13:28 -0400, Steven Lembark wrote:
> Iain Buchanan wrote:
> > watchdogs are nice, and linux makes them ultra-easy to program, but of
> > course if your watchdog task dies, then the machine effectively hits the
> > reset button for you - no nice shutdown whatsoever! (Which is what you
> > want in a hard lock-up, but not if your programming skills are the cause
> > of the problem :)
>
> - Have the system turn off the watchdog if the file is
> closed.
maybe, maybe not :) I personally like setting CONFIG_WATCHDOG_NOWAYOUT
on systems with hardware watchdogs, especially remote unattended
systems. Usually your watchdog task never dies on such a system, and
when it does (be it from a nice kill or not) you want the watchdog to
fire. However if this is a semi-used system (you ssh or log-in to it in
any way to do stuff) you may not want this.
> - After that just open it and poke a bit out now and
> then.
>
> - Make a point of closing the file on exit.
>
> #!/usr/bin/perl
>
> use strict;
>
> open my $fh, '<', '/path/to/watchdog/file'
it's usually /dev/watchdog if you're using the linux kernel interface.
I agree that your script is nice and simple, and hence less prone to
errors. I coded mine in c++ because I use it not only for a machine
type watchdog, but also a task based watchdog that reboots the machine
based on certain tasks living or not. Each task has to register with
the watchdog server and continually tell the server they're alive, or
reboot! But that's a story for another thread...
--
Iain Buchanan <iaindb at netspace dot net dot au>
Linux - Where do you want to fly today?
-- Unknown source
--
gentoo-user@lists.gentoo.org mailing list
next prev parent reply other threads:[~2008-04-07 23:30 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 7:33 [gentoo-user] Emergency shutdown, how to? Dale
2008-03-28 7:41 ` Daniel Pielmeier
2008-03-28 7:46 ` Dirk Heinrichs
2008-03-28 7:51 ` Daniel Pielmeier
2008-03-28 8:07 ` Dale
2008-03-28 8:11 ` Dirk Heinrichs
2008-03-28 10:12 ` Michal 'vorner' Vaner
2008-04-02 13:36 ` Liviu Andronic
2008-04-02 13:44 ` [gentoo-user] " Michael Schmarck
2008-04-02 13:49 ` Dirk Heinrichs
2008-04-02 14:19 ` [gentoo-user] " Michael Schmarck
2008-04-02 14:28 ` [gentoo-user] " Dirk Heinrichs
2008-04-02 14:41 ` Mark Knecht
2008-04-02 15:18 ` Neil Bothwick
2008-04-02 20:58 ` darren kirby
2008-04-02 22:24 ` Neil Bothwick
2008-04-02 17:40 ` [gentoo-user] " Michael Schmarck
2008-04-02 17:48 ` Neil Bothwick
2008-04-03 4:51 ` [gentoo-user] " Michael Schmarck
2008-04-03 8:41 ` Neil Bothwick
2008-04-03 8:56 ` [gentoo-user] " Michael Schmarck
2008-04-04 0:28 ` Iain Buchanan
2008-04-04 21:05 ` [gentoo-user] " Mark Knecht
2008-04-04 21:50 ` Neil Bothwick
2008-04-04 22:14 ` Mark Knecht
2008-04-05 16:42 ` Steven Lembark
2008-04-07 1:07 ` Iain Buchanan
2008-04-07 17:28 ` Steven Lembark
2008-04-07 23:29 ` Iain Buchanan [this message]
2008-04-08 18:19 ` Steven Lembark
2008-04-02 15:50 ` [gentoo-user] " Steven Lembark
2008-04-02 17:28 ` Volker Armin Hemmann
2008-04-02 19:19 ` Dale
2008-04-02 19:57 ` Mark Knecht
2008-04-02 21:42 ` Neil Bothwick
2008-04-02 19:59 ` Volker Armin Hemmann
2008-04-02 21:43 ` Neil Bothwick
2008-04-02 21:56 ` Dale
2008-04-03 2:35 ` Hal Martin
2008-04-03 16:10 ` Steven Lembark
2008-04-03 18:15 ` Dale
2008-04-03 19:38 ` Steven Lembark
2008-04-04 0:45 ` Dale
2008-04-04 17:04 ` Steven Lembark
2008-04-04 19:52 ` Dale
2008-04-04 20:24 ` Steven Lembark
2008-04-04 0:29 ` Iain Buchanan
2008-04-04 1:00 ` Dale
2008-04-04 17:06 ` Steven Lembark
2008-04-07 6:42 ` Dan Farrell
2008-04-07 20:14 ` Steven Lembark
2008-03-28 8:29 ` Neil Bothwick
2008-03-28 11:09 ` Dale
2008-03-28 7:42 ` Dirk Heinrichs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1207610982.15340.50.camel@orpheus \
--to=iaindb@netspace.net.au \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox