Subject: Re: power management and related concerns
To: Jachym Holecek <freza@dspfpga.com>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: tech-kern
Date: 07/01/2006 09:15:24
On Sat, 1 Jul 2006 14:50:38 +0200, Jachym Holecek <freza@dspfpga.com>
wrote:

> # Steven M. Bellovin 2006-07-01:
> > On Fri, 30 Jun 2006 17:28:15 -0700, "Garrett D'Amore"
> > <garrett_damore@tadpole.com> wrote:
> > 
> > > Well, I've made the mistake of looking at what we currently have in
> > > NetBSD.  And comparing it with some real (our) hardware.
> > > 
> > > There are few quick points for discussion:
> > > 
> > > [... power management (not) in NetBSD ...]
> > >
> > I've been thinking similar thoughts.  I have a paper design for (what I
> > had tentatively called) envstatd.  The config file would look something
> > like this:
> > 
> > 	acpibat0         <.04      /bin/shutdown -p now
> > 	temp=acpitemp	 >70*2	   /bin/shutdown -p now
> > 
> > where the *2 indicates that it has to happen twice in a row.
> 
> What does "twice in a row" mean? What about ">70*2m" ==> "temperature
> over 70 degC for two minutes"?
>

I was assuming that the daemon would be polling at some interval.  Your
question is a good one that bears further thought.

Hmm -- suppose that the field was always a time -- in seconds by default,
but also accepting 2m30s or some such.  (Better yet, 2:30, since that
avoids overreliance on English.)  That makes the configuration file
independent of the polling interval, which is good.

		--Steven M. Bellovin, http://www.cs.columbia.edu/~smb