This package provides battery-stats-collector, a daemon which will periodically collect statistics about the charge of the batteries present.
It also proves a binary called battery-graph, which can be used to generate qplot graphs about the battery charge/discharge patterns over time
Note: This requires APM or ACPI to be enabled and working in your kernel.