]> pere.pagekite.me Git - homepage.git/commitdiff
New post.
authorPetter Reinholdtsen <pere@hungry.com>
Wed, 23 Mar 2016 21:06:08 +0000 (22:06 +0100)
committerPetter Reinholdtsen <pere@hungry.com>
Wed, 23 Mar 2016 21:06:08 +0000 (22:06 +0100)
blog/data/2016-03-23-battery-stats.txt [new file with mode: 0644]

diff --git a/blog/data/2016-03-23-battery-stats.txt b/blog/data/2016-03-23-battery-stats.txt
new file mode 100644 (file)
index 0000000..f77b162
--- /dev/null
@@ -0,0 +1,51 @@
+Title: Full battery stats collector is now available in Debian
+Tags: english, debian
+Date: 2016-03-23 22:10
+
+<p>Since this morning, the battery-stats package in Debian include an
+extended collector that will collect the complete battery history for
+later processing and graphing.  The original collector store the
+battery level as percentage of last full level, while the new
+collector also record battery vendor, model, serial number, design
+full level, last full level and current battery level.  This make it
+possible to predict the lifetime of the battery as well as visualise
+the energy flow when the battery is charging or discharging.</p>
+
+<p>The new tools are available in <tt>/usr/share/battery-stats/</tt>
+in the version 0.5.1 package in unstable.  Get the new battery level graph
+and lifetime prediction by running:
+
+<p><pre>
+/usr/share/battery-stats/battery-stats-graph /var/log/battery-stats.csv
+</pre></p>
+
+<p>Or select the 'Battery Level Graph' from your application menu.</p>
+
+<p>The flow in/out of the battery can be seen by running (no menu
+entry yet):</p>
+
+<p><pre>
+/usr/share/battery-stats/battery-stats-graph-flow
+</pre></p>
+
+<p>I'm not quite happy with the way the data is visualised, at least
+when there are few data points.  The graphs look a bit better with a
+few years of data.</p>
+
+<p>A while back one important feature I use in the battery stats
+collector broke in Debian.  The scripts in
+<tt>/usr/lib/pm-utils/power.d/</tt> were no longer executed.  I
+suspect it happened when Jessie started using systemd, but I do not
+know.  The issue is reported as bug #818649 against pm-utils.  I
+managed to work around it by adding an udev rule to call the collector
+script every time the power connector is connected and disconnected.
+With this fix in place it was finally time to make a new release of
+the package, and get it into Debian.</p>
+
+<p>If you are interested in how your laptop battery is doing, please
+check out the
+<a href="https://tracker.debian.org/pkg/battery-stats">battery-stats</a>
+in Debian unstable, or rebuild it on Jessie to get it working on
+Debian stable. :) The upstream source is available from
+<a href="https://github.com/petterreinholdtsen/battery-stats">github</a>.
+As always, patches are very welcome.</p>