How to know the temperature of the processor?

2 answers 2

There are two ways: complex and curved. The curve is to use WMI, for example, through WMI I can’t do anything. Someone says that there are values, but the reality does not correspond.

The hard way is to use the driver and get through it the MSR with the RDMSR instruction, probably there are other ways through the driver.

  • four
    and through WMI and do not need to try. there is no CPU temperature - teran
  • @teran about what, drag, and speech. But the Internet is full of it in this way, which especially does not work. - Vladimir Martyanov
  • For some reason, it works for me ... what am I doing wrong? - Akina
  • @Akina I really don't know. Maybe the firewood for the mother give such information? The given code through WScript in Windows does not work definitely. - Vladimir Martyanov
  • WU WMI-classes do not appear from nowhere. The same Win32_TemperatureProbe, through which temperature can also be obtained, is exported from SMBIOS, and MSAcpi_ThermalZoneTemperature from the ACPI Thermal Zone. No support - no value - Akina

The curve is to use WMI, for example, through WMI I can’t do anything. Someone says that there are values, but the reality does not correspond.

Set colItems = GetObject("winmgmts:\\.\root\WMI").ExecQuery("SELECT * FROM MSAcpi_ThermalZoneTemperature",,48) For Each objItem in colItems Wscript.Echo "CurrentTemperature: " & (objItem.CurrentTemperature-2732)/10 Next 
  • Is this a C # code ?? - tCode
  • This is a VBS. And the request code can be easily used from other languages. Delov something - choose the right namespace and do not forget that the collection is returned. And in Sharpe, excuse me, not strong. - Akina
  • The principle is clear, thank you. - Alexander Puzanov