Skip to content

Hardware temperatures (sensors_temperatures()) #371

@giampaolo

Description

@giampaolo

From g.rodola on April 24, 2013 14:59:32

Proposal

I borrowed this idea from glances: https://github.com/nicolargo/glances
...which internally uses pysensors: https://pypi.python.org/pypi/PySensors/
API may look like this:

>>> psutil.cpu_temperature()
[cputemp(name='cpu1', temp=35, high=70, critical=90), 
 cputemp(name='cpu2', temp=30, high=70, critical=90,
 ...]

psutil.cpu_temperature(celsius=False) could be used to express temperature in
fahrenheit. The order in which CPUs are returned should be the same as other cpu_*
functions and be consistent across calls so that:

>>> psutil.cpu_temperature()[0]

...and:

>>> psutil.cpu_times(percpu=True)[0]

...will refer to the same CPU.

FreeBSD: http://superuser.com/questions/344498/get-temperature-of-cpu-intel-core-i5-in-freebsd

Original issue: http://code.google.com/p/psutil/issues/detail?id=371

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions