Is it possible in .Net to get data on %% GPU load?

For example, the following code allows you to get averaged data on %% CPU utilization for the last second:

PerformanceCounter cpumonitor = new PerformanceCounter("Processor", "% Processor Time","_Total"); var CurCPULoad= cpucounter.NextValue().ToString() 

Is something similar for a GPU possible to get? (I didn’t find anything suitable in listing possible data sources for PerformanceCounter ... maybe I’ve looked at something ...)

  • one
    look towards WMI - NMD

1 answer 1

In the process of finding the answer to the question I got the following results:

Using the operating system (WMI, System Diagnostics, etc.) to obtain data on the loading of the GPU will not work. But in general, WMI is a very, very valuable resource for obtaining other data on the state of the system (and not only that, there are many useful things to get there). For the convenience of working with WMI, I recommend using this useful programulina. I am able to generate a resource request code in C #.

Nevertheless, the solution was still found. Those. A C # project was found in which this functionality is implemented. Here it is on GH If in a nutshell, then ATI and NVidia use their API provided with the hardware drivers. (how to deal with Intell graphics has not yet found)