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

Add new sensors_fans method #974

Merged
merged 1 commit into from Feb 13, 2017
Merged

Conversation

nicolargo
Copy link
Contributor

Add a new method to grab the fans speed.

The method is called sensors_fans():

>>> import psutil
>>> psutil.sensors_fans()
defaultdict(<type 'list'>, {'dell_smm': [('Processor Fan', 0)]})

@giampaolo
Copy link
Owner

giampaolo commented Feb 13, 2017

Thanks for this PR.
I'm gonna merge this but I will apply changes to the return value so that:

  • we return a dict instead of a defaultdict
  • dict value will be a list of namedutples

@giampaolo giampaolo merged commit 8b1bc14 into giampaolo:master Feb 13, 2017
giampaolo added a commit that referenced this pull request Feb 13, 2017
giampaolo added a commit that referenced this pull request Feb 13, 2017
@giampaolo
Copy link
Owner

OK, here's the new API:

>>> import psutil
>>> psutil.sensors_fans()
{'asus': [sfan(label='cpu_fan', current=3200)]}

@giampaolo
Copy link
Owner

New 5.2.0 version is out on PYPI.

@nicolargo nicolargo deleted the fansensor branch March 5, 2017 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants