Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Feb 1998 07:33:35 -0800
From:      Mike Smith <mike@smith.net.au>
To:        "Bruce M. Walter" <walter@fortean.com>
Cc:        John Fieber <jfieber@indiana.edu>, Mike Smith <mike@smith.net.au>, hackers@FreeBSD.ORG
Subject:   Re: Powering off the system/UPS 
Message-ID:  <199802071533.HAA00923@dingo.cdrom.com>
In-Reply-To: Your message of "Fri, 06 Feb 1998 11:53:21 EST." <Pine.BSF.3.95q.980206113512.22744A-100000@callisto.fortean.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > [I say "illusion" because if the time between a low battery
> > warning and a dead battery is less than your halt(8) time, you
> > are SOL either way.  With a sufficiently smart and powerful UPS,
> > you should be able to avoid such situations though.]
> 
> My empirical testing shows that at least the TrippLite and APC dumb UPS
> models pull the low battery trigger about 2-3 minutes before failure.
> This seems sufficient even for my big nasty machines, but user milage may
> vary.

With a toy UPS, the *only* thing that makes any sense is to gather your 
skirts as soon as it's obvious you're not looking at a 5-second 
dropout.  (Read up on the shelf life of lead-acid gel batteries if this 
confuses you.)   Because this is local policy, it's something that 
belongs in a userspace tool, which the proposed architecture supports.

> I'm working on reorganizing the kernel code to allow for this right now...
> Here's what I'm attempting as per Mike's suggestions:
> 
> 1) There will be another queue, tenatively called 'SHUTDOWN_PRE_HALT'
> which will run after SHUTDOWN_POST_SYNC and before an actual reboot/halt.

SHUTDOWN_POWEROFF

> int
> pri_at_shutdown(bootlist_fn func, void *arg, int when, int priority);

Maybe at_shutdown_pri(), but I think that's not a bad idea.  Actually, 
I would go further and make at_shutdown() a macro, to emphasise that 
it's a shortcut version.  Make the priority gap much wider though, eg. 
0-10000 or more.
-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\ 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802071533.HAA00923>