]> pere.pagekite.me Git - homepage.git/blob - blog/data/2016-03-15-battery-stats.txt
Generated.
[homepage.git] / blog / data / 2016-03-15-battery-stats.txt
1 Title: Making battery measurements a little easier in Debian
2 Tags: english, debian
3 Date: 2016-03-15 15:00
4
5 <p>Back in September, I blogged about
6 <a href="http://people.skolelinux.org/pere/blog/The_life_and_death_of_a_laptop_battery.html">the
7 system I wrote to collect statistics about my laptop battery</a>, and
8 how it showed the decay and death of this battery (now replaced). I
9 created a simple deb package to handle the collection and graphing,
10 but did not want to upload it to Debian as there were already
11 <a href="https://tracker.debian.org/pkg/battery-stats">a battery-stats
12 package in Debian</a> that should do the same thing, and I did not see
13 a point of uploading a competing package when battery-stats could be
14 fixed instead. I reported a few bugs about its non-function, and
15 hoped someone would step in and fix it. But no-one did.</p>
16
17 <p>I got tired of waiting a few days ago, and took matters in my own
18 hands. The end result is that I am now the new upstream developer of
19 battery stats (<a href="https://github.com/petterreinholdtsen/battery-stats">available from github</a>) and part of the team maintaining
20 battery-stats in Debian, and the package in Debian unstable is finally
21 able to collect battery status using the <tt>/sys/class/power_supply/</tt>
22 information provided by the Linux kernel. If you install the
23 battery-stats package from unstable now, you will be able to get a
24 graph of the current battery fill level, to get some idea about the
25 status of the battery. The source package build and work just fine in
26 Debian testing and stable (and probably oldstable too, but I have not
27 tested). The default graph you get for that system look like this:</p>
28
29 <p align="center"><img src="http://people.skolelinux.org/pere/blog/images/2016-03-15-battery-stats-graph-example.png" width="70%" align="center"></p>
30
31 <p>My plans for the future is to merge my old scripts into the
32 battery-stats package, as my old scripts collected a lot more details
33 about the battery. The scripts are merged into the upstream
34 battery-stats git repository already, but I am not convinced they work
35 yet, as I changed a lot of paths along the way. Will have to test a
36 bit more before I make a new release.</p>
37
38 <p>I will also consider changing the file format slightly, as I
39 suspect the way I combine several values into one field might make it
40 impossible to know the type of the value when using it for processing
41 and graphing.</p>
42
43 <p>If you would like I would like to keep an close eye on your laptop
44 battery, check out the battery-stats package in
45 <a href="https://tracker.debian.org/pkg/battery-stats">Debian</a> and
46 on
47 <a href="https://github.com/petterreinholdtsen/battery-stats">github</a>.
48 I would love some help to improve the system further.</p>