check_battery

check_battery

Checks the data available from acpi in /sys/class/power_supply/BAT*/{charge,energy}_now or from apm.
If discharging, then warn,
if battery low, then critical.
If the battery design capacity is present, it can be used to warn of an aging battery with a very simple change to a commented line.