This package will periodically collect statistics about the charge of the batteries present.
It also contains a simple graph utility to show the battery charge/discharge patterns over time.
Note: This requires APM to be enabled and working in your kernel.