Re: Script to monitor battery status on X220

2012-07-20 Thread Erich Dollansky
Hi, On Friday 20 July 2012 16:13:56 Matthias Apitz wrote: > 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

Re: Script to monitor battery status on X220

2012-07-20 Thread Matthias Apitz
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 t

Re: Script to monitor battery status on X220

2012-07-20 Thread Erich Dollansky
Hi, On Friday 20 July 2012 12:31:08 Lars Engels wrote: > On Fri, Jul 20, 2012 at 10:04:59AM +0700, Erich Dollansky wrote: > > Hi, > > > > I forget yesterday to share these two scripts: > > > > http://www.alogreentechnologies.com/freebsd/checkbattery > > > > checks the battery status of an X220

Re: Script to monitor battery status on X220

2012-07-19 Thread Lars Engels
On Fri, Jul 20, 2012 at 10:04:59AM +0700, Erich Dollansky wrote: > Hi, > > I forget yesterday to share these two scripts: > > http://www.alogreentechnologies.com/freebsd/checkbattery > > checks the battery status of an X220 and shuts the machine down when the > battery falls to 2% or below. >

Script to monitor battery status on X220

2012-07-19 Thread Erich Dollansky
Hi, I forget yesterday to share these two scripts: http://www.alogreentechnologies.com/freebsd/checkbattery checks the battery status of an X220 and shuts the machine down when the battery falls to 2% or below. The status is checked every minute. It calls the following script to shut the mach