Subject: Re: Documentation on power management
To: None <kenh@cmf.nrl.navy.mil>
From: Ken Nakata <kenn@synap.ne.jp>
List: current-users
Date: 01/03/1999 11:36:46
On Wed, 02 Dec 1998 22:51:56 -0500, Ken Hornstein wrote:
> Everyone,
> 
> I just commited some documentation to the web server on the new power
> management features and how to use them.  This is available under:
> 
> http://www.netbsd.org/Documentation/power-mgmt/index.html
> 
> Feedback is welcome (I am fixing some grammer mistakes, so right now
> I'm just interested in comments on the content).

Hi,

Great work!  I just like to comment on a discripancy between this page 
and apmd(8) man page, and request for feature addition to apmd.

Apmd(8) man page says:

     apmd periodically polls the APM driver for the current power state.  If
     the battery charge level changes substantially or the external power sta-
     tus changes, the new status is logged.  The polling rate defaults to once
     per 10 minutes, but may be specified using the -t command-line flag.

but your web page says:

    2. The APM kernel driver gets the request event the next time it
       polls the APM BIOS (typically once per second) and queues the
       standby/suspend request to the apm daemon.

I think the man page is incorrect since I can get syslog messages as
frequently as one every 15 seconds even though I run apmd with the
option "-t 600".

Or, are these talking about two entirely different polling periods?

----
What I want in apmd:

It would be great if we could set logging threshholds for battery
charge level and estimated battery life.

Apmd logs every time APM BIOS changes its estimate of battery life,
and on my Toshiba 3010, the estimate changes rather frequently (up to
every 15 seconds or so) and wildly (anywhere from 60min to 160min)
depending on the level of the system's activity.  If I'm doing
something like compiling and installing a package as root, I get many
status change log messages and soon root's xterm window will be filled
with syslog messages from apmd.

And frankly, I don't care how much longer APM BIOS thinks the battery
will last, unless the number is less than, say, 3 minutes.

Even if there's no root's xterm window to mess up, /var/log/messages
is full of these unimportant (to me, anyway) entries and it makes it a 
bit difficult to dig up a log message that's really important.

So, I think there should be user-configurable logging options, maybe
not just thresholds for battery charge level and estimated battery
life but even more flexible options (e.g. one might want to disable
apmd logging entirely, or another might not want any message until
battery level goes down to "low" after which point much more frequent
update on battery status is desired, etc.).

What do you think?

another Ken