Hi all,

I want to give batmon.app ACPI support on OpenBSD.

This is what I get on my Thinkpad T60:

$ sysctl | grep acpibat
hw.sensors.acpibat0.volt0=10.80 VDC (voltage)
hw.sensors.acpibat0.volt1=12.41 VDC (current voltage)
hw.sensors.acpibat0.power0=0.00 W (rate)
hw.sensors.acpibat0.watthour0=47.16 Wh (last full capacity)
hw.sensors.acpibat0.watthour1=2.36 Wh (warning capacity)
hw.sensors.acpibat0.watthour2=0.20 Wh (low capacity)
hw.sensors.acpibat0.watthour3=47.16 Wh (remaining capacity), OK
hw.sensors.acpibat0.watthour4=47.52 Wh (design capacity)
hw.sensors.acpibat0.raw0=0 (battery full), OK

Some questions.
If I had another battery, would I get exactly the same stuff a second time but e.g. with "acpibat1" ? I suppose yes.

I need to interpret always e.g. the "remaining capacity" in such a way that it works across different laptop models. Is it reliable to always read "watthour3" ? Or can I trust the description "remaining capacity"? or neither?

To know if the laptop is attached to a power source and to know if it is charging or discharging, what can I use?
I "acpiac0" tells me if I am attached o a power outlet or not, I suppose:

hw.sensors.acpiac0.indicator0=On (power supply)
hw.sensors.acpiac0.indicator0=Off (power supply)

however this doesn't tell me yet if it is charging. Should I check this?
hw.sensors.acpibat0.raw0=1 (battery discharging), OK
hw.sensors.acpibat0.raw0=0 (battery idle), OK
hw.sensors.acpibat0.raw0=0 (battery full), OK

being "raw0" it seems that I need to check the description of the item instead of the actual value which is only 0 or 1, which is less desirable

Riccardo

Reply via email to