然后,您可以使用pythonnet模块来处理.dll并获取这些程序提供的任何状态。cputhermeter提供每个核心CPU温度,openhardwaremonitor提供其他一切。不需要使用要求程序在后台处于活动状态的WMI。
我已经编写了一个小脚本(python 3.6.5)来显示系统上可用的每个温度传感器,当然您可以很容易地为其他传感器类型修改此脚本。必须以管理员身份运行:
import clr #package pythonnet, not clr
openhardwaremonitor_hwtypes = ['Mainboard','SuperIO','CPU','RAM','GpuNvidia','GpuAti','TBalancer','Heatmaster','HDD']
cputhermometer_hwtypes = ['Mainboard','SuperIO','CPU','GpuNvidia','GpuAti','TBalancer','Heatmaster','HDD']
openhardwaremonitor_sensortypes = ['Voltage','Clock','Temperature','Load','Fan','Flow','Control','Level','Factor','Power','Data','SmallData']
cputhermometer_sensortypes = ['Voltage','Clock',&