How can we get a CPU temperature through WMI?
Namespace: root\wmi
Path: MSAcpi_ThermalZoneTemperature
To run this (using wmic
) from the Windows command line (cmd.exe
) the command would be:
wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CriticalTripPoint, CurrentTemperature
Attention: the results are in Kelvin * 10
, so you need to divide the result by 10, and then subtract 273.15 to get °Celsius.
More information:
WUtils.com :
MSAcpi_ThermalZoneTemperature
PropertiesWikipedia : Kelvin (and conversion to/from °C and °F)
- Wikipedia : Windows Management Instrumentation (WMI)
- MSDN : WMI Command Line (WMIC)
- Tech Advisor : What's the Best CPU Temperature?
- SpeedFan : Fan & Temperature control utility (Freeware)
- systeminformation: systeminformation npm package (for nodejs)