ACPIBAT(4) BSD Kernel Interfaces Manual ACPIBAT(4)NAMEacpibat — ACPI Battery
SYNOPSIS
acpibat* at acpi?
DESCRIPTION
The acpibat driver supports ACPI batteries.
The battery status is made available through the envsys(4) API. The bat‐
tery information can be displayed also with the envstat(8) command:
$ envstat -d acpibat0
Current CritMax WarnMax WarnMin CritMin Unit
present: ON
design voltage: 14.400 V
voltage: 16.267 V
design cap: 74.880 Wh
last full cap: 48.260 Wh
charge: 47.910 5.000% 0.414% Wh (99.27%)
charge rate: N/A
discharge rate: 16.641 W
charging: OFF
charge state: NORMAL
Depending on the battery, the unit of measurement is either watt-hour
(Wh) or ampere-hour (Ah) for the capacity related information. From
these the “charge” is usually the most interesting value, but it is pos‐
sible to derive useful information also from the other values. For exam‐
ple, when acpiacad(4) is disconnected, the “discharge rate” gives a
coarse approximation of the current power consumption. The ratio between
the design capacity and the last full capacity on the other hand reveals
the overall “health” of deteriorating lithium-ion batteries.
EVENTS
The acpibat driver is able to send events to powerd(8) daemon when a
capacity state has been changed. The new state will be reported as the
fourth argument to the /etc/powerd/scripts/sensor_battery script. If a
custom capacity limit was set via envstat(8), the acpibat driver will
report a user-capacity event to the same script when current capacity
limit has been reached.
SEE ALSOacpi(4), envsys(4), envstat(8), powerd(8)HISTORY
The acpibat driver appeared in NetBSD 1.6.
BUGS
The ACPI specifications make a distinction between “control method
batteries” and “smart batteries”. The acpibat driver only supports con‐
trol method batteries. Furthermore, acpibat does not yet support some
additional battery information introduced in the ACPI 4.0 standard.
BSD March 17, 2010 BSD