Page 1 of 1 1
Topic Options
#181906 - 2007-10-24 05:01 PM CPU Temperature
Stanley Offline
Starting to like KiXtart

Registered: 2004-06-03
Posts: 130
Loc: Upstate NY, USA
Don't know if anyone would be interested, but I was bored.

 Code:
$strComputer = "."

$colTempProbe = GetObject("Winmgmts:\\"+$strComputer+"\root\wmi").InstancesOf("MSAcpi_ThermalZoneTemperature")

For Each $obj In $colTempProbe      
	
	$ctemp = $obj.CurrentTemperature
	
	$ctemp = ($ctemp - 2732)/10
	
	? 'Celsius: '$ctemp
	
	$ctp = $obj.CriticalTripPoint
	
	$ctp = ($ctp - 2732)/10
	
	? 'Celsius TripPoint: '$ctp 
	
	$ftemp = $ctemp * 9 / 5 + 32
	
	? 'Fahrenheit: '$ftemp
	
	$ftp = $ctp * 9 / 5 + 32
	
	? 'Fahrenheit TripPoint: '$ftp 
	
    	$Num = $Num +1
Next

If $Num = 0 
	
    ? "No temperature probe data"

EndIf

Get $ 


Edited by Stanley (2007-10-24 05:01 PM)
_________________________
Taxation WITH representation isn't so hot, either!

Top
#181910 - 2007-10-24 10:44 PM Re: CPU Temperature [Re: Stanley]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Thanks. Could be useful in future projects.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#181981 - 2007-10-26 11:31 AM Re: CPU Temperature [Re: Stanley]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
Thanks \:\)
And to know all available properties:
 Code:
Break On
$strComputer = "."
$objWMIService = GetObject("winmgmts:\\" + $strComputer + "\root\wmi")
$colItems = $objWMIService.ExecQuery("Select * from MSAcpi_ThermalZoneTemperature",,48)
For each $objItem in $colItems
  "Active: " + $objItem.Active ?
  For each $Item in $objItem.ActiveTripPoint
    "*ActiveTripPoint: " + $Item ?
  Next
  "ActiveTripPointCount: " + $objItem.ActiveTripPointCount ?
  "CriticalTripPoint: " + $objItem.CriticalTripPoint ?
  "CurrentTemperature: " + $objItem.CurrentTemperature ?
  "InstanceName: " + $objItem.InstanceName ?
  "PassiveTripPoint: " + $objItem.PassiveTripPoint ?
  "Reserved: " + $objItem.Reserved ?
  "SamplingPeriod: " + $objItem.SamplingPeriod ?
  "ThermalConstant1: " + $objItem.ThermalConstant1 ?
  "ThermalConstant2: " + $objItem.ThermalConstant2 ?
  "ThermalStamp: " + $objItem.ThermalStamp ?
  ?
Next

Top
#182000 - 2007-10-26 07:07 PM Re: CPU Temperature [Re: Arend_]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
5 different computers and none of them support this call.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 478 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.053 seconds in which 0.023 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org