Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get sensor values (like Temperature of GPU and CPU) and fan speeds of Windows 10 PC

I've been trying to get a Python script to show temperatures for CPU, GPU and other availabile sensors in my hardware, but I haven't found anything useful.

I tried using WMI to get those values, but my processor is apparently not supported.

The code I used was:

import wmi
w = wmi.WMI(namespace="root\wmi")
temperature_info = w.MSAcpi_ThermalZoneTemperature()[0]
print temperature_info.CurrentTemperature

which I got from another stackoverflow thread, and I get thrown the error Traceback (most recent call last):

  File "C:/Users/Joe/Desktop/test.py", line 3, in <module>
    temperature_info = w.MSAcpi_ThermalZoneTemperature()[0]
  File "C:\Python27\lib\site-packages\wmi.py", line 819, in query
    handle_com_error ()
  File "C:\Python27\lib\site-packages\wmi.py", line 241, in handle_com_error
    raise klass (com_error=err)
x_wmi: <x_wmi: Unexpected COM Error (-2147217396, 'OLE error 0x8004100c', None, None)>

which, according to Microsoft Support, means Not Supported (0x8004100C) I have tried running the command-line version of this code in a cmd.exe window ran as an administrator, but I got the same error.

Is there any other way to access CPU and GPU temperatures?

PS: My OS is Windows 10 and my CPU is AMD FX-8350. I am unsure whether my OS or my CPU are at fault for this error.

like image 337
George Lazu Avatar asked Jun 25 '16 19:06

George Lazu


People also ask

How do I check my GPU temp and fan speed?

NVIDIA GeForce Experience To find the temperature monitor, you need to access the in-game overlay settings. Click the triangular icon in the top right. On the window that pops up, click “Performance.” You'll see a bunch of statistics about your GPU here, including the GPU clock, temperature, fan speed, and power draw.

How do I monitor my PC fans and temps?

HWMonitor is a great tool if you'd like to monitor more than just your CPU. HWMonitor displays not only your CPU's temperature, core voltage, operating frequency, and load, but it is also able to monitor your GPU, your fan speeds, your storage devices, and plenty more.

Is there a temperature monitor in Windows 10?

Neither Windows 10 nor Windows 11 has a built-in way to see your computer's CPU temperature, so you'll need a third-party program for this. (However, it may be displayed in your computer's UEFI firmware or BIOS.) There are quite a few Windows programs that you can use to monitor the temperature.


Video Answer


1 Answers

Here is a way to get your GPU temperature.

Use nvidia-smi tool.

This is .exe file present in the location "C:\Program Files\NVIDIA Corporation\NVSMI".

In the command prompt, just enter:

cd C:\Program Files\NVIDIA Corporation\NVSMI

then type:

nvidia-smi

This will display an output like this:

enter image description here

You can see the GPU temp! (red underline)

Coming to the CPU and Fan speed values, Microsoft apparently does not have a built in functionality to at least showcase these values to the user. But you can try 3rd part applications like MSI Afterburner. But Microsoft strictly warns against this as this might affect the performance.

like image 115
Sushanth Avatar answered Oct 10 '22 08:10

Sushanth