Looking for Laptop "power" utility for linux

Looking for Laptop "power" utility for linux

Post by Tom » Fri, 25 Jun 1999 04:00:00



Hi,

I have a Dell Inspirion 7000 on which I am running RedHat 5.2. I have a
Windows partition as well. When I am running Windows, I can use the
utility which came with it for monitoring my battery power, etc.
However, when I am running Linux, I have no idea of how much power is in
the battery.

Are there power utilities for Linux?

Thanks
Tom


 
 
 

Looking for Laptop "power" utility for linux

Post by Doug DeJul » Sat, 26 Jun 1999 04:00:00



>I have a Dell Inspirion 7000 on which I am running RedHat 5.2. I have a
>Windows partition as well. When I am running Windows, I can use the
>utility which came with it for monitoring my battery power, etc.
>However, when I am running Linux, I have no idea of how much power is in
>the battery.

>Are there power utilities for Linux?

Yeup.

Make sure you have a kernel with advanced power management support
compiled in to it.  You should probably also run "apmd".  Then you can
use plenty of tools to access the battery information, or just access
"/proc/apm" yourself to make your own tools.
--

HKS, Incorporated | http://www.hks.net/~ddj/

 
 
 

Looking for Laptop "power" utility for linux

Post by Glen Batchel » Sat, 26 Jun 1999 04:00:00


  If you don't have apmd, check it out. If all you want is a battery
monitor, look in the source of apmd on how to request the battery
levels from BIOS. Make it an X app and there you have it..

 http://www.cut.de/bkr/linux/apmd/

        Ryengoth

>Hi,

>I have a Dell Inspirion 7000 on which I am running RedHat 5.2. I have a
>Windows partition as well. When I am running Windows, I can use the
>utility which came with it for monitoring my battery power, etc.
>However, when I am running Linux, I have no idea of how much power is in
>the battery.

>Are there power utilities for Linux?

>Thanks
>Tom



 
 
 

Looking for Laptop "power" utility for linux

Post by John Stembrid » Sun, 27 Jun 1999 04:00:00


Here's a handy script I use for monitoring the battery status.
Use at your own risk.

#!/bin/tcsh
#
# battery       Display battery status
#
set RAW = `cat /proc/apm`
set LDV = $RAW[1]       # 1=Linux driver version
set APMBIOS = $RAW[2]   # 2=APM BIOS version
#
# 3=APM flags from APM Installation Check (0x00):
#    bit 0: APM_16_BIT_SUPPORT
#    bit 1: APM_32_BIT_SUPPORT
#    bit 2: APM_IDLE_SLOWS_CLOCK
#    bit 3: APM_BIOS_DISABLED
#    bit 4: APM_BIOS_DISENGAGED

switch ($RAW[4])        # 4=AC line status
  case 0x00:
    set AC="Off-line"
    breaksw
  case 0x01:
    set AC="On-line"
    breaksw
  case 0x02:
    set AC="On backup power"
    breaksw
  default:
    set AC="Unknown"
endsw

switch ($RAW[5])        # 5=Battery status
  case 0x00:
    set BS="High"
    breaksw
  case 0x01:
    set BS="Low"
    breaksw
  case 0x02:
    set BS="Critical"
    breaksw
  case 0x03:
    set BS="Charging"
    breaksw
  default:
    set BS="Unknown"
endsw

set PRBL = $RAW[7]       # Percentage remaining battery life (-1 = unknown)
set TRBL = $RAW[8]       # Time of remaining battery life (-1 = unknown)
#set UNITS = $RAW[9]      # Units time

echo "APM BIOS" ${APMBIOS} "  Linux driver" ${LDV}
echo "AC Status:" $AC "  Battery Status:" $BS
echo "Percentage of full charge:" $PRBL

##########################




>  If you don't have apmd, check it out. If all you want is a battery
>monitor, look in the source of apmd on how to request the battery
>levels from BIOS. Make it an X app and there you have it..

> http://www.cut.de/bkr/linux/apmd/

>        Ryengoth

>>Hi,

>>I have a Dell Inspirion 7000 on which I am running RedHat 5.2. I have a
>>Windows partition as well. When I am running Windows, I can use the
>>utility which came with it for monitoring my battery power, etc.
>>However, when I am running Linux, I have no idea of how much power is in
>>the battery.

>>Are there power utilities for Linux?

>>Thanks
>>Tom



 
 
 

1. Looking for Laptop "power" utility for linux

As others have already said, you must have apm support in your kernel.

If you don't want to roll your own X app to read the info in /proc,
two that I know of are xbatt and wmbattery.  (Both are packages in
Debian --  I don't know about RedHat.)

Anyody know of others?

        --Jack

------------------  Posted via CNET Linux Help  ------------------
                    http://www.searchlinux.com

2. AIX Frequently Asked Questions (Part 5 of 5)

3. I must hit "power" and then "reset" to power up my PC

4. TMC TI5VGF (VIA MVP3) 2Mb: "Win 95 shutoff"

5. GETSERVBYNAME()????????????????????"""""""""""""

6. licensing error: ipc write: Out of stream resources ????

7. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

8. AIX Remote Printing?

9. Looking for somebody who can run "linux REDHAT" in a "77e" monitor.

10. Looking for "tip" communication utility on Linux

11. Type "(", ")" and "{", "}" in X...

12. can't recover "fsck" after power off without "init 0"