Read GPU temperature in C#

Viewed 7685

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

3 Answers

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);
    }
}
Related