I help manage a little over 2,000 workstations. One of the things I'm not able to do, is monitor the workstation temperatures.
What I would love to find, is a program that runs for literally like a second, just enough to grab CPU temperatures, and log that into a text file. Then I can just pull the file off remotely. I would like to have all this happen completely silent, but if not, I can figure something out. From what I can tell, programs like Speedfan/CoreTEMP wont dump to a text file unless you physically open them up first.
Anyone know of any programs that may help me with this? Or any other way?
Anyone know of a way to dump CPU temps to a text file?
Started by 7angofragger, Jul 05 2012 09:01 AM
#1
Posted 05 July 2012 - 09:01 AM
#2
Posted 05 July 2012 - 11:36 AM
I created and tested the following Windows Management Instrumention function in KiXtart.
However it reports the CPU temperature as "60 C" which is not correct. I tried researching this and found
winmgmts://./root/OpenHardwareMonitor using "SELECT * FROM Sensor"
Which should be something like...
However, I am getting errors
. Perhaps Ron (aka; AdvancedSetup) may have an implementation idea.
Once it works it is an easy matter to redirect the output to a TXT file and run periodically.
Dim $objWMIServ, $CPU_temp
$CPU_temp=0
$objWMIServ=GetObject("winmgmts://./root\WMI").ExecQuery("SELECT * FROM MSAcpi_ThermalZoneTemperature","WQL",48)
For Each $obj In $objWMIServ
$cpu=$obj.CurrentTemperature
Next
$cpu_temp = ($cpu/10)-273.15
$cpu_temp = "$cpu_temp C"
? $CPU_temp
sleep 5
However it reports the CPU temperature as "60 C" which is not correct. I tried researching this and found
winmgmts://./root/OpenHardwareMonitor using "SELECT * FROM Sensor"
Which should be something like...
$objWMIServ=GetObject("winmgmts://./root/OpenHardwareMonitor").ExecQuery("SELECT * FROM Sensor","WQL",48)
However, I am getting errors
Once it works it is an easy matter to redirect the output to a TXT file and run periodically.
David H. Lipman
DLipman@Verizon.Net
DLipman@Verizon.Net
#3
Posted 05 July 2012 - 11:54 AM
Is it able to be used though? Like does it work successfully?
Does Malware make cups of herbal tea? If so, it would make the following brews: Organic Parsley Tea, Organic Patchouli Tea,
Organic Pau d’arco Tea and Organic Raspberry Tea. Organic herbal tea is outstanding for ones health.
Organic Pau d’arco Tea and Organic Raspberry Tea. Organic herbal tea is outstanding for ones health.
#4
Posted 05 July 2012 - 12:07 PM
I am not a programmer, I am a scriptor.
In theory one can use Windows Management Instrumentation (WMI) to obtain the CPU temperature. My initial script was close. However it is not getting the right value. Conceivably there is a way to get the correct value. I just could not come up with it, and script it, in the 45 minutes I looked into this issue.
Research found the following URL...
http://social.msdn.m...5-8be3908a21b8/
At the bottom reply...
Further research found this URL...
http://stackoverflow...-false-readings
Where the query indicates "My problem, is that the script displays 59.55 C" which is what I get.
The reply to that was using OpenHardwareMonitor which provides a WMI interface. I did not see that when I made my initial reply. So it is possible (in theory) to employ OpenHardwareMonitor and use WMI and get the correct CPU temperature.
In theory one can use Windows Management Instrumentation (WMI) to obtain the CPU temperature. My initial script was close. However it is not getting the right value. Conceivably there is a way to get the correct value. I just could not come up with it, and script it, in the 45 minutes I looked into this issue.
Research found the following URL...
http://social.msdn.m...5-8be3908a21b8/
At the bottom reply...
Quote
The Microsoft function for finding CPU temperature does not work. Don't use it. If you search the Microsoft forums, you will find the Microsoft people blaming the motherboard manufacturers for not implementing their standards.
Further research found this URL...
http://stackoverflow...-false-readings
Where the query indicates "My problem, is that the script displays 59.55 C" which is what I get.
The reply to that was using OpenHardwareMonitor which provides a WMI interface. I did not see that when I made my initial reply. So it is possible (in theory) to employ OpenHardwareMonitor and use WMI and get the correct CPU temperature.
David H. Lipman
DLipman@Verizon.Net
DLipman@Verizon.Net
#5
Posted 05 July 2012 - 12:46 PM
Humm... Yeah, that would actually be an ideal way...
I just got RealTemp 3.70 to work, but it isn't going to work for me. I modified the INI file, so it launches minimized, and logs the temperatures, but you actually have to physically close the program for it to dump the results to the text file. If i try to taskkill it/PID Kill it, or use Close Application through Kaseya, it wont report, which is very odd... So I'm afraid I'm back to the drawing board
I just got RealTemp 3.70 to work, but it isn't going to work for me. I modified the INI file, so it launches minimized, and logs the temperatures, but you actually have to physically close the program for it to dump the results to the text file. If i try to taskkill it/PID Kill it, or use Close Application through Kaseya, it wont report, which is very odd... So I'm afraid I'm back to the drawing board
#6
Posted 05 July 2012 - 03:52 PM
Don't have a lot of time to look at it right now but using VBScript this should work as a quick one assuming your motherboard is new enough and the OS supports the WMI call to it.
Save the file as CPUTEMP.VBS using Notepad. Then you can run it using CScript
C:\TEST\CSCRIPT CPUTEMP.VBS
If I have time I'll look at a better solution later on.
Save the file as CPUTEMP.VBS using Notepad. Then you can run it using CScript
C:\TEST\CSCRIPT CPUTEMP.VBS
strServer = "."
Set objWMI = GetObject("winmgmts://" & strServer & "/root\WMI")
Set objInstances = objWMI.InstancesOf("MSAcpi_ThermalZoneTemperature",48)
On Error Resume Next
For Each objInstance in objInstances
With objInstance
WScript.Echo "Current Temp: " & .CurrentTemperature / 10 - 273.15
End With
On Error Goto 0
Next
If I have time I'll look at a better solution later on.
#7
Posted 05 July 2012 - 04:21 PM
Ron, that's a VBS version of the KiXtart script I provided which gives a temperature of 60 Deg C which is not correct.
David H. Lipman
DLipman@Verizon.Net
DLipman@Verizon.Net
#8
Posted 05 July 2012 - 05:00 PM
As I said I'll have to look at it further when I have time, but that is not what it says on my system. It says it is 27.85c in zone 0 and 29.85 in zone 1
If it's saying 60c for you then it may be an issue on your system.
Assuming there is a valid WMI entry then one should be able to obtain the temp for each core but not sure that WMI will have it.
60 degrees Celsius = 140 degrees Fahrenheit
27 degrees Celsius = 80.6 degrees Fahrenheit
If it's saying 60c for you then it may be an issue on your system.
Assuming there is a valid WMI entry then one should be able to obtain the temp for each core but not sure that WMI will have it.
60 degrees Celsius = 140 degrees Fahrenheit
27 degrees Celsius = 80.6 degrees Fahrenheit
#9
Posted 05 July 2012 - 05:23 PM
GUI based utilities deny the 60 Deg C result.
But, I don't need a utility. My desktop can display its parameters including the CPU and MB temperatures as seen below.
But, I don't need a utility. My desktop can display its parameters including the CPU and MB temperatures as seen below.
David H. Lipman
DLipman@Verizon.Net
DLipman@Verizon.Net
#10
Posted 05 July 2012 - 09:14 PM
Not sure David - as I said my own computer here does not come back with 60
Have not looked into the code and have not run on other computers
Have not looked into the code and have not run on other computers
#11
Posted 05 July 2012 - 09:32 PM
Apparently implementation by manufacturers has something to do with it returning bad data...
From Post #4
http://social.msdn.m...5-8be3908a21b8/
At the bottom reply...
So it could be hit of miss based upon chip-sets.
I have tried using Open Hardware Monitor's COM Automation, which uses Aga Controls [Aga.Controls.dll] but I have problems coding it.
From Post #4
http://social.msdn.m...5-8be3908a21b8/
At the bottom reply...
Quote
The Microsoft function for finding CPU temperature does not work. Don't use it. If you search the Microsoft forums, you will find the Microsoft people blaming the motherboard manufacturers for not implementing their standards.
So it could be hit of miss based upon chip-sets.
I have tried using Open Hardware Monitor's COM Automation, which uses Aga Controls [Aga.Controls.dll] but I have problems coding it.
David H. Lipman
DLipman@Verizon.Net
DLipman@Verizon.Net
#12
Posted 15 July 2012 - 01:26 AM
what about CPUId's paid Pro version of their HWMonitor product? I believe it interfaces with WMI and know for a fact it has remote monitoring and logging support, whih I believe uses basic text files by default
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Sign In
Create Account
Back to top











