I am adding a couple of new features to my program that currently sends the CPU usage and RAM usage to Arduino via serial connection (see this). I am trying to add GPU and Disk usage as well. Disk usage is not a problem but fetching GPU usage from Windows have become a real trouble.
I've tried using PerformanceCounter
but that doesn't seem to work at all! See the code below.
PerformanceCounter gpuCounter = new PerformanceCounter("GPU Engine", "Utilization Percentage");
string gpuUsage = gpuCounter.NextValue()
I want the GPU usage in percentage like this:
GPU usage: #.#%
Is there any possible way i can achieve this?