Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

battery plugin: read linux sysfs charge files #3190

Merged
merged 3 commits into from Feb 26, 2020

Conversation

maclomhair
Copy link
Contributor

@maclomhair maclomhair commented Jun 25, 2019

This patch will enable the collectd battery module to read capacity off the sysfs power_supply charge_now, charge_full and charge_full_design files since some systems do not offer the "energy_now", "energy_full" and "energy_full_design" files that are currently used.

The module will still check for the energy files but fall back to the new method.

Since the charge files are provided in microamps/hour, the values are adjusted to be Wh and therefore the same as provided by the original approach. (The same conversion factor voltage_min_design is used by xfce4 power manager so the values match)

ChangeLog: battery plugin: read linux sysfs charge files

@maclomhair maclomhair changed the title ChangeLog: battery plugin: read linux sysfs charge files battery plugin: read linux sysfs charge files Jun 25, 2019
Copy link
Contributor

@dago dago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dago dago merged commit 887409e into collectd:master Feb 26, 2020
@dago dago added this to the 5.11.0 milestone Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants