Monitoring Graphics Processing Unit (GPU) with Processing 3

Thank you @micycle for the reply.

I have tried to make it work with the jSensors library, but I’m not experienced enough to know how to import the library in my sketch. The readme file it not very clear about this either.

For the CPU usage, everything worked rightaway, I could just do:

import java.lang.management.ManagementFactory;
import com.sun.management.OperatingSystemMXBean;
OperatingSystemMXBean osBean;

void setup(){
    size(800, 600);
    osBean = ManagementFactory.getPlatformMXBean(OperatingSystemMXBean.class);
}

void draw(){
    println((float)osBean.getSystemCpuLoad());
}

Although I get the warning “No library found for com.sun.management”, everything seems to work just fine. Now, how would I achieve the same for GPU? How to import the library?

Thank you in advance.

Kind regards,
Thomas