OK, here’s another psutil release. Main highlights of this release are sensors-related APIs.
好,这是另一个psutil版本。 此版本的主要亮点是与传感器相关的API。
温度范围 ( Temperatures)
It is now possible to retrieve hardware temperatures. The relevant commit is here. Unfortunately this is Linux only. I couldn’t manage to implement this on other platforms mainly for two reasons:
现在可以检索硬件温度。 相关的提交在这里 。 不幸的是,这仅是Linux。 我无法在其他平台上实现此功能主要有两个原因:
- On Windows it is hard to do this in a hardware agnostic fashion. I bumped into 3 different approaches, all using WMI, and none of them worked with my hardware so I gave up.
- On OSX it appears it is possible to retrieve temperatures relatively easy, but I have a virtualized OSX box which does not support sensors, so basically I gave up on this due to lack of hardware. If somebody wants to give it a try be my guest.
- 在Windows上,以硬件不可知的方式很难做到这一点。 我碰到了3种不同的方法,全部使用WMI,但它们都不与我的硬件一起工作,所以我放弃了。
- 在OSX上,似乎可以相对容易地获取温度ÿ