Re: [ACPI-sppt] ACPI Battery Problems

Emma Jane Hogbin <[email protected]>
Newsgroups gmane.linux.acpi.support
Message-ID <[email protected]>
On Fri, Jul 04, 2003 at 08:52:41PM +0100, Ian Chilton wrote:
> I can't get it to show the battery status - all I get is this:

Me either. Sometimes that's just the way life is, I think. I wrote a
little perl script which I pasted to the list earlier today to deal with
it. Basically it looks in two files to get the numbers I need and then
does the math to figure out the battery life that's left.

cat /proc/acpi/battery/BAT0/info <--- maximum possible charge
cat /proc/acpi/battery/BAT0/state <--- remaining capacity

If you'd like a copy of the perl script, I've put it online:
http://xtrinsic.com/geek/code/battery.pl.txt

> Also, I have had a few times running on power or battey where I have
> been working away and the machine has either powered off or hard reset.

Or runs out of battery. ;) My alarm doesn't work either which means I have
had to guess at how much battery life I have left. The little perl script
helps but it definitely doesn't have any kind of alarm attached to it.

emma

-- 
Emma Jane Hogbin
[[ 416 417 2868 ][ www.xtrinsic.com ]]


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.