• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

How can I read GPU sensors via C code?

Kazem Shekofteh

New Member
Joined
Jan 18, 2015
Messages
4 (0.00/day)
Please help me
I need to read some sensors of my GTX 760 GPU (such as GPU core clock, power, temperature, etc) and also similar sensors of my Intel HD 4600 embedded in my Intel Core i7.
I have tried NVAPI in cuda. It did not completely cover my needs. It does not fully support my GPU and only temperature sensor can be read there.
I need to write something like CPU-Z software. It is very critical to me.

Thanks
 
NVAPI does provide the sensor data you are looking for, but maybe the relevant headers are part of the NDA version of the SDK. Try contacting NVIDIA.

Another method you could use is to access the shared memory of GPU-Z, which provides the sensor readings, but requires GPU-Z running in the background.
 
Thanks for your reply.
What do you mean by "NDA version of the SDK"?
How is it possible to access the shared memory of GPU-Z? Could please provide me a sample?

Do you know about nvml? I get error when calling some of its functions like nvmlDeviceGetClockInfo(...) while this function runs correctly on another Geforce model.
 
Last edited by a moderator:
Thank you
I start to read the instructions in the link.

It is stated in the NVML API reference manual that it is supported on Tesla, Quadro and GRID. But for some functions some other GPUs are supported. For example my GPU supports the function for reading temperature.
The most strange thing is that the function for reading clock frequency which is not supported on my laptop (Geforce 740M) is correctly executed on another laptop with a Geforce 760M GPU. Both of them are from Kepler family.
 
Back
Top