Difference between revisions of "Plugin:Battery"

From collectd Wiki
Jump to: navigation, search
(Undo revision 3268 by 86.110.154.78 (talk) (vandalism))
(note sysfs support)
Line 5: Line 5:
 
   | Status={{supported}}
 
   | Status={{supported}}
 
   | FirstVersion={{Version|3.7}}
 
   | FirstVersion={{Version|3.7}}
   | Copyright=''2006–2007'' Florian octo Forster<br />''2008'' Michał Mirosław
+
   | Copyright=''2006–2014'' Florian octo Forster<br>''2008'' Michał Mirosław<br>''2014'' Andy Parkins
 
   | License={{GPLv2}}
 
   | License={{GPLv2}}
 
   | Manpage=''n/a''
 
   | Manpage=''n/a''
Line 19: Line 19:
 
== Dependencies ==
 
== Dependencies ==
  
* Linux
+
* Linux uses one of these sources (first match):
** <code>/proc</code>-file system
+
** sysfs filesystem with <code>/sys/class/power_supply</code> (available since collectd 5.4.2).
 +
** proc filesystem with <code>/proc/acpi/battery</code>
 +
** proc filesystem with <code>/proc/pmu</code>.
 
* Mac OS X
 
* Mac OS X
 
** <code>IOKit</code><br /><span style="font-size: smaller;">(Part of Mac OS X.)</span>
 
** <code>IOKit</code><br /><span style="font-size: smaller;">(Part of Mac OS X.)</span>

Revision as of 22:25, 30 March 2015

Battery plugin
Type: read
Callbacks: init, read
Status: supported
First version: 3.7
Copyright: 2006–2014 Florian octo Forster
2008 Michał Mirosław
2014 Andy Parkins
License: GPLv2
Manpage: n/a
List of Plugins

The Battery plugin collects the battery's charge, the drawn current and the battery's voltage. Right now the plugin works with ACPI- and PMU-batteries under Linux and under Mac OS X.

Example graphs

Plugin-battery-charge.png Plugin-battery-current.png Plugin-battery-voltage.png

Dependencies

  • Linux uses one of these sources (first match):
    • sysfs filesystem with /sys/class/power_supply (available since collectd 5.4.2).
    • proc filesystem with /proc/acpi/battery
    • proc filesystem with /proc/pmu.
  • Mac OS X
    • IOKit
      (Part of Mac OS X.)