Script to monitor battery status on X220
Matthias Apitz
guru at unixarea.de
Fri Jul 20 09:33:18 UTC 2012
El día Friday, July 20, 2012 a las 03:45:23PM +0700, Erich Dollansky escribió:
> > ...
> > Is it necessary to poll? Usually devd generates an event when the
> > battery status and/or percentage changes. Just read the events from
> > /var/run/devd.pipe.
> >
> this is a good idea. I did not like this solution either but did not get a better idea when I did it.
I wrote and used something similar for my netbook EeePC 900; it turned
out that the battery is not showing the remaining capacity in a linear
way; the last 5% are 'consumed' in a few seconds, i.e. below 20% I
polled every 2 seconds;
matthias
--
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <guru at unixarea.de> - w http://www.unixarea.de/
More information about the freebsd-current
mailing list