summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2017-01-24 21:13:35 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2017-01-24 21:13:35 +0100
commit62b92a1d569f40ca06ff45cb8b00f58b233cfbe6 (patch)
tree421261dd85de4fac190711513df533065e8ce46a /docs
parenta17a6d6c0de3a9804452b13881eb544fc726b2d6 (diff)
downloadpsutil-62b92a1d569f40ca06ff45cb8b00f58b233cfbe6.tar.gz
#371: update doc
Diffstat (limited to 'docs')
-rw-r--r--docs/index.rst35
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 0131b56a..8cd8875f 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -617,6 +617,41 @@ Network
.. versionadded:: 3.0.0
+Sensors
+-------
+
+.. function:: sensors_temperatures(fahrenheit=False)
+
+ Return hardware temperatures. Each entry is a namedtuple representing a
+ certain hardware sensor (it may be a CPU, an hard disk or something
+ else, depending on the OS and its configuration).
+ All temperatures are expressed in celsius unless *fahrenheit* is set to
+ ``True``. Example::
+
+ >>> import psutil
+ >>> psutil.sensors_temperatures()
+ {'acpitz': [shwtemp(label='', current=47.0, high=103.0, critical=103.0)],
+ 'asus': [shwtemp(label='', current=47.0, high=None, critical=None)],
+ 'coretemp': [shwtemp(label='Physical id 0', current=52.0, high=100.0, critical=100.0),
+ shwtemp(label='Core 0', current=45.0, high=100.0, critical=100.0),
+ shwtemp(label='Core 1', current=52.0, high=100.0, critical=100.0),
+ shwtemp(label='Core 2', current=45.0, high=100.0, critical=100.0),
+ shwtemp(label='Core 3', current=47.0, high=100.0, critical=100.0)]}
+
+ See also `sensors.py <https://github.com/giampaolo/psutil/blob/master/scripts/sensors.py>`__
+ for an example application.
+
+ .. warning::
+
+ This API is experimental. Backwards incompatible changes may occur if
+ deemed necessary.
+
+ Availability: Linux
+
+ .. versionadded:: 5.1.0
+
+
+
Other system info
-----------------