监视CPU温度和GPU温度的软件
本帖最后由 ufozhouyu 于 2009-7-27 04:45 编辑现在需要一款能监视CPU和GPU温度的软件,长驻内存,实时(1分钟~5分钟一次也行,可以设置最好啦)监视温度并传递到服务端,服务端只要能显示某台机器的当前CPU和GPU温度和历史最高温度就可以,然后再有一个清除历史最高温度值的功能,以后发现超标温度的机器维修后可以规零,方便查看并维护,哪个高手能做个出来啊! 这个官网上有现成的,我以前看过,具体在哪忘了,搜索一下很容易就找到了 Func _Cpu_Usage($init = 0)
;~ if $cpu_halt = false then
Local $liOldIdleTime = 0
Local $liOldSystemTime = 0
$SYSTEM_BASIC_INFORMATION = DllStructCreate("int;uint;uint;uint;uint;uint;uint;ptr;ptr;uint;byte;byte;short")
$status = DllCall("ntdll.dll", "int", "NtQuerySystemInformation", "int", 0, _
"ptr", DllStructGetPtr($SYSTEM_BASIC_INFORMATION), _
"int", DllStructGetSize($SYSTEM_BASIC_INFORMATION), _
"int", 0)
ConsoleWrite("ispred -1" & @CRLF)
If $statusThen Return -1
ConsoleWrite("ispred while" & @CRLF)
While 1
$SYSTEM_PERFORMANCE_INFORMATION = DllStructCreate("int64;int")
$SYSTEM_TIME_INFORMATION = DllStructCreate("int64;int64;int64;uint;int")
$status = DllCall("ntdll.dll", "int", "NtQuerySystemInformation", "int", 3, _
"ptr", DllStructGetPtr($SYSTEM_TIME_INFORMATION), _
"int", DllStructGetSize($SYSTEM_TIME_INFORMATION), _
"int", 0)
ConsoleWrite("ispred -2" & @CRLF)
If $statusThen Return -2
$status = DllCall("ntdll.dll", "int", "NtQuerySystemInformation", "int", 2, _
"ptr", DllStructGetPtr($SYSTEM_PERFORMANCE_INFORMATION), _
"int", DllStructGetSize($SYSTEM_PERFORMANCE_INFORMATION), _
"int", 0)
ConsoleWrite("ispred -3" & @CRLF)
If $statusThen Return -3
If $init = 1 Or $liOldIdleTime = 0 Then
$liOldIdleTime = DllStructGetData($SYSTEM_PERFORMANCE_INFORMATION, 1)
$liOldSystemTime = DllStructGetData($SYSTEM_TIME_INFORMATION, 2)
ConsoleWrite("sleep" & @CRLF)
;~ $cpu_halt = true
Sleep(50)
;~ $timer5 = TimerInit()
if $init = 1 Then
Return -99
;~ ExitLoop
EndIf
Else
ConsoleWrite("konacno" & @CRLF)
;~ if TimerDiff($timer5) >= 1000 then
$dbIdleTime = DllStructGetData($SYSTEM_PERFORMANCE_INFORMATION, 1) - $liOldIdleTime
$dbSystemTime = DllStructGetData($SYSTEM_TIME_INFORMATION, 2) - $liOldSystemTime
$liOldIdleTime = DllStructGetData($SYSTEM_PERFORMANCE_INFORMATION, 1)
$liOldSystemTime = DllStructGetData($SYSTEM_TIME_INFORMATION, 2)
$dbIdleTime = $dbIdleTime / $dbSystemTime
$dbIdleTime = 100.0 - $dbIdleTime * 100.0 / DllStructGetData($SYSTEM_BASIC_INFORMATION, 11) + 0.5
Return $dbIdleTime
;~ EndIf
EndIf
$SYSTEM_PERFORMANCE_INFORMATION = 0
$SYSTEM_TIME_INFORMATION = 0
ConsoleWrite("ponovo while" & @CRLF)
WEnd
;~ endif
EndFunc ;==>CurrentCPU 试了一下,时常跳出的数字是50.5,63,76,而我使用EVEREST查看时,我的CPU是32度和29度,我的是双核的,不知是回为显示的数是两个CPU的温度之各吗?? 看看看直播...................... 我也是50.5和63 还没有答案啊?? 我这运行了没反映呢 我也没有反应,什么情况 看看看直播......................
页:
[1]