Which python module is used to read CPU temperature and processor Fan speed in Windows?
I explored the WMI python module, however I am unable to find the correct option or function to capture the above mentioned info.
Actually I tried the following code snip, but it returns 'nothing'.
import wmi
w = wmi.WMI()
print w.Win32_TemperatureProbe()[0].CurrentReading
Is there a way to get this information?
As per Microsoft's MSDN:
Most of the information that the Win32_TemperatureProbe WMI class provides comes from SMBIOS. Real-time readings for the CurrentReading property cannot be extracted from SMBIOS tables. For this reason, current implementations of WMI do not populate the CurrentReading property. The CurrentReading property's presence is reserved for future use.
You can use MSAcpi_ThermalZoneTemperature
instead:
import wmi
w = wmi.WMI(namespace="root\\wmi")
print (w.MSAcpi_ThermalZoneTemperature()[0].CurrentTemperature/10.0)-273.15
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With