1 Title: Full battery stats collector is now available in Debian
5 <p>Since this morning, the battery-stats package in Debian include an
6 extended collector that will collect the complete battery history for
7 later processing and graphing. The original collector store the
8 battery level as percentage of last full level, while the new
9 collector also record battery vendor, model, serial number, design
10 full level, last full level and current battery level. This make it
11 possible to predict the lifetime of the battery as well as visualise
12 the energy flow when the battery is charging or discharging.</p>
14 <p>The new tools are available in <tt>/usr/share/battery-stats/</tt>
15 in the version 0.5.1 package in unstable. Get the new battery level graph
16 and lifetime prediction by running:
19 /usr/share/battery-stats/battery-stats-graph /var/log/battery-stats.csv
22 <p>Or select the 'Battery Level Graph' from your application menu.</p>
24 <p>The flow in/out of the battery can be seen by running (no menu
28 /usr/share/battery-stats/battery-stats-graph-flow
31 <p>I'm not quite happy with the way the data is visualised, at least
32 when there are few data points. The graphs look a bit better with a
33 few years of data.</p>
35 <p>A while back one important feature I use in the battery stats
36 collector broke in Debian. The scripts in
37 <tt>/usr/lib/pm-utils/power.d/</tt> were no longer executed. I
38 suspect it happened when Jessie started using systemd, but I do not
39 know. The issue is reported as
40 <a href="https://bugs.debian.org/818649">bug #818649</a> against
41 pm-utils. I managed to work around it by adding an udev rule to call
42 the collector script every time the power connector is connected and
43 disconnected. With this fix in place it was finally time to make a
44 new release of the package, and get it into Debian.</p>
46 <p>If you are interested in how your laptop battery is doing, please
48 <a href="https://tracker.debian.org/pkg/battery-stats">battery-stats</a>
49 in Debian unstable, or rebuild it on Jessie to get it working on
50 Debian stable. :) The upstream source is available from
51 <a href="https://github.com/petterreinholdtsen/battery-stats">github</a>.
52 As always, patches are very welcome.</p>