RFC: powerd Patch & proposed future changes
Alban Hertroys
dalroi at solfertje.student.utwente.nl
Mon Jul 6 10:01:12 UTC 2009
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!
More information about the freebsd-current
mailing list