Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read GPU temperature in C#

Tags:

c#

temp

gpu

ati

I want to create a program that monitors my GPU's temperature (AMD ATI HD) and if it goes below say 50C to send me an email.

I know how to send an email - I just have no idea on how to get the temerature :/

Any help would be awesome!

Running Visual Studio - for Windows Forms (or Java works too!)

Andy

like image 300
Andy Avatar asked Mar 21 '23 09:03

Andy


2 Answers

I I suggest that you have a look at the OpenHardwareMonitor Project over here

The Open Hardware Monitor is a free open source software that monitors temperature sensors, fan speeds, voltages, load and clock speeds of a computer.

The Open Hardware Monitor supports most hardware monitoring chips found on todays mainboards. The CPU temperature can be monitored by reading the core temperature sensors of Intel and AMD processors. The sensors of ATI and Nvidia video cards as well as SMART hard drive temperature can be displayed. The monitored values can be displayed in the main window, in a customizable desktop gadget, or in the system tray. The Open Hardware Monitor software runs on 32-bit and 64-bit Microsoft Windows XP / Vista / 7 and any x86 based Linux operating systems without installation.

They are open source and you should be able to check out their code and have a look there.

like image 172
David Pilkington Avatar answered Apr 05 '23 15:04

David Pilkington


Check out the Overdrive API in the AMD Display Library. They have a C# example but you'll have to add the hook to the temperature library yourself.

AMD Display Library

Specifically: ADL2_Overdrive6_Temperature_Get (ADL_CONTEXT_HANDLE context, int iAdapterIndex, int *lpTemperature)

like image 31
Yggsoft Solutions Avatar answered Apr 05 '23 15:04

Yggsoft Solutions