4

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

user2864740
  • 60,010
  • 15
  • 145
  • 220
Andy
  • 373
  • 1
  • 7
  • 24

3 Answers3

4

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.

David Pilkington
  • 13,528
  • 3
  • 41
  • 73
3

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)

dav_i
  • 27,509
  • 17
  • 104
  • 136
  • Thanks for this. I had a look through it and found it fairly confusing.. The examples were giving me all sorts of errors. – Andy Dec 11 '13 at 06:29
  • 1
    @Andy I actually have some code from interfacing with the overdrive libraries somewhere... if I can find it I'll update this later. BTW, if you're doing this for mining, cgminer has an API interface that can list this easily. [link](https://github.com/ckolivas/cgminer/blob/master/API-README) See the mobile example at the bottom. – Yggsoft Solutions Dec 11 '13 at 07:55
  • The link is dead. The new link to the SDK is http://developer.amd.com/display-library-adl-sdk – devsnd Sep 18 '17 at 15:27
0

For NVIDIA users...

I tried Open Hardware Monitor, and it worked, but sometimes it would get in a state when it was causing high CPU usage while pulling the GPU temperature (this problem would go away if I had it pulling only the CPU temperature).

I ended up using this NuGet package to pull the temperature directly from NVAPI.

https://github.com/falahati/NvAPIWrapper

Some sample code looks like...

PhysicalGPU[] gpus = PhysicalGPU.GetPhysicalGPUs();
foreach (PhysicalGPU gpu in gpus)
{
    Console.WriteLine(gpu.FullName);
    foreach (GPUThermalSensor sensor in gpu.ThermalInformation.ThermalSensors)
    {
        Console.WriteLine(sensor.CurrentTemperature);
    }
}
Truisms Hounds
  • 422
  • 4
  • 9