Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jul 2009 12:01:08 +0200
From:      Alban Hertroys <dalroi@solfertje.student.utwente.nl>
To:        Rene Schickbauer <cavac@magicbooks.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: RFC: powerd Patch & proposed future changes
Message-ID:  <2A58225C-B4F9-40E5-8AFE-D169F391B4C2@solfertje.student.utwente.nl>
In-Reply-To: <18510.213.150.228.38.1246864978.squirrel@mail.magicbooks.org>
References:  <18510.213.150.228.38.1246864978.squirrel@mail.magicbooks.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 6, 2009, at 9:22 AM, Rene Schickbauer wrote:

> BTW, i'm also thinking of having the option to have powerd log the  
> battery
> status (ac mode + load + charge level) every 5 Minutes or so to  
> syslog. That
> way, a second script (log parser) may be able to determine  
> information about
> the battery - like how long does it take to charge, rough capacity
> estimation and possible degradation of battery.


Currently some similar information is available through sysctl's (cpu  
load + temperature for example). To me that seems to be a bit more  
flexible as a means of providing such information about battery status  
(you don't depend on a 5 minute interval in a log-file) and probably  
easier to read (programmatically) than parsing a file. And it doesn't  
need writing to a file-system that's trying to safe power while being  
carried around with the system off AC.

OTOH, a sysctl doesn't keep a history of past events while a log-file  
does; you could write something that parsed an existing log-file to  
determine battery life expectations immediately (provided the log-file  
wasn't rotated too recent) while reading sysctl's would need some time  
to collect enough statistics.

Just an idea.

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:909,4a51cb65759151706116102!





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2A58225C-B4F9-40E5-8AFE-D169F391B4C2>