Cannot get proper query CPU Temperature under win7-64bit

hello:
I Can’t query CPU proper Temperature (MSAcpi_ThermalZoneTemperature) on
Windows 7 64 bit using wmi. The temperature I got is the mother
board’s.

The laptop is ASUS UX21e,Intel® Core™ i7 2677M Processor,Genuine
Windows® 7 Professional 64bit,Intel® QS67 Express Chipset.

The program is as the following:
require ‘win32ole’

wmi = WIN32OLE.connect(“winmgmts://./root/wmi”)
qry = wmi.execquery(“select * from MSAcpi_ThermalZoneTemperature” )
qry.each { |i|
$now_temp_k= i.send(“CurrentTemperature”)
$now_temp_c=($now_temp_k - 2732) / 10
$critical_temp_k= i.send(“CriticalTripPoint”)
$critical_temp_c=($critical_temp_k - 2732) / 10
}
puts “Current CPU Temperature: #{$now_temp_c} Centigrade ,Critical
Trip Point is #{$critical_temp_c} Centigrade.”

Any help would be appreciated!

Regards
Edward

On Jul 1, 2012, at 3:18 AM, Edward QU [email protected] wrote:

Any help would be appreciated!

Regards
Edward

Hi Edward,

It looks like the problem you’re facing isn’t a ruby problem. You might
have better luck with your motherboard manufacturer’s documentation.

Jams

Thank you Jams. Let me check the specification of wmi and motherboard
Manuel.