CPU Temp and Fan Speed

(imported topic written by amagewick91)

Hello,

I have been trying this all day, and have not been able to make any progress. I am trying to use WMI to report either the fan speed or the cpu temp, but all of the options that seem available do not have a value to them. Tried Win32_Fan, Win32_TemperatureProbe with no luck. I saw the same for CIM but I am not sure how to use or if that would work.

I tried the MS WMI administrator utilities and the values that seem to be what I need are blank, so it is no wonder I am running into problems. What do other programs that report temp and fan speeds use?

(imported comment written by Lee Wei)

Looks like this is challenging because many systems do not report the info in WMI. Do a bunch of web searches…

I did find a WMI class for CPU temperature that works on my system.

The temperature is 0.1 degree Kelvin, hence the little extra code to convert to Fahrenheit.

(((it-2732)/10) as floating point * “1.8” as floating point + 32 as floating point) of integer value of selects “CurrentTemperature from MSAcpi_ThermalZoneTemperature” of wmi “root\wmi”

Lee Wei

(imported comment written by BenKus)

Very interesting, Lee Wei…

I ran this on 3 computers:

  • My laptop reported: 77
  • My huge (and very hot) test laptop: 140
  • My server: errored out

Ben

(imported comment written by amagewick91)

Hey thanks so far! It seems that this is working for all of our laptops, and some stragglers here and there, which honestly was my primary concern! I am betting that these others WMI commands that I have tried would have worked as well. I was testing with my Optiplex 760 with no luck :(. Now if I can get the desktops rolling! Anyone else have any ideas? Maybe WMI is disabled and I can enable it somehow or change some settings or security around?

(imported comment written by SystemAdmin)

Do you have Dell OMCI installed on the machines? Those are the custom dell WMI extensions. There might be something in there you could use to report the CPU temp.

(imported comment written by amagewick91)

No on the Dell OMCI, but will check it out! Looks like I am doing good, had 2 laptops already, one at 181ºF and one at 200ºF. Now they are around 100… sheesh.

(imported comment written by amagewick91)

I have been messing around with the Dell OMCI WMI stuff and I don’t seem to be getting any further as of this time. I have noticed something odd when I run the relevance below.

q: ((if exists string value of property “CurrentReading” of it then string value of property “Currentreading” of it else “n/a”)) of (select objects “CurrentReading from Dell_TemperatureSensor” of wmi “root\dellomci”)

When I run the above in relevance debugger I get no output at all. When I run this one (below) I get “Singular expression refers to nonexistent object.”

Q: (string value of selects “CurrentReading FROM Dell_TemperatureSensor” of wmi “root\dellomci”) as string

Is there no hope for me on this? This is driving me crazy! I am going to do more research, but there has to be an easy way to do this! =p

(imported comment written by amagewick91)

I am still having problems with getting an actual temp reading from our dell optiplex desktops. If anybody else is working with this and knows the answer please let me know. I will keep digging for now.