How to get the temperature and load of the video card using java

Question:

Hello, please tell me how to get the temperature and workload of the video card using java.

Answer:

Each card manufacturer (or rather GPU) has its own proprietary API. Nvidia has it like this , ATI has it like this

The interfaces of these APIs are in C / C ++, so you have to write JNI interfaces from Java for them.

In particular, for Nvidia, the prototype for calling the function that returns the temperature of the card (or rather the processor) is as follows:

BOOL CDECL NvCplGetThermalSettings
  (IN UINT nWindowsMonitorNumber,
   OUT DWORD* pdwCoreTemp, //температура процессора
   OUT DWORD* pdwAmbientTemp,
   OUT DWORD* pdwUpperLimit);
Scroll to Top