CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

16. Using ACPI

There are a few different applications/daemons you will want to install on your system: acpid (the daemon that will control your hardware states), and acpi (the interface to monitor events and states) are the base install. The acpi Debian package is only available in testing and is unstable. If you're running stable you won't be able to install it without playing around with apt and your list.sources file. You can probably also compile from source. If you do get acpi installed you can use it to monitor your system like this: acpi -V. The output will tell you about your system. Mine looks like this:


     Thermal 1: ok, 47.1 degrees C
     Thermal 2: ok, 45.1 degrees C
  AC Adapter 1: off-line <-- running off battery
  AC Adapter 1: on-line <-- running off AC power

Unfortunately, the -V "full version" doesn't work for me. Fortunately I can still look in each of the acpi files individually for information about my system. Check in the /proc/acpi directory for various things of importance. If I want to check my battery I read the following file like this: cat /proc/acpi/battery/BAT0/state. The output is as follows:


present:                 yes
capacity state:          ok
charging state:          discharging <-- running off battery
present rate:            unknown
remaining capacity:      3920 mAh <-- watch this number
present voltage:         14800 mV

present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            unknown
remaining capacity:      3840 mAh <-- capacity getting smaller
present voltage:         14800 mV

present:                 yes
capacity state:          ok
charging state:          charging <-- AC adapter plugged in
present rate:            unknown
remaining capacity:      3840 mAh
present voltage:         14800 mV

If I want information about my battery in general I check it out like this: cat /proc/acpi/battery/BAT0/info


present:                 yes
design capacity:         3920 mAh
last full capacity:      3920 mAh
battery technology:      rechargeable
design voltage:          14800 mV
design capacity warning: 30 mAh
design capacity low:     20 mAh
capacity granularity 1:  10 mAh
capacity granularity 2:  3470 mAh
model number:            Bat0
serial number:              
battery type:            Lion
OEM info:                Acer

You're smart people. You can probably figure it out from here. :)