With this code, this works for windows. For Linux(Ubuntu) "PerformanceCounter is not provided in Linux"
PerformanceCounter counter = GetPerfCounterForProcessId(process.Id); //Just gets process by id dont worry...
var processUsages = counter.NextValue();
double processUsage = counter.NextValue() / Environment.ProcessorCount;
How could I transfer this method to get the CPU Usage from a process by ID with it working in Linux?