I am trying to create an application that pulls process information and puts it into a SQL table.
I am pulling Process Name, PID, CPU Time, Memory Usage, Page, and Handles.
Everything works fine except for the CPU Time. Here is the code I am using to get the CPU information:
Process[] processes = Process.GetProcesses(machineName);
foreach (Process p in processes)
{
var cpuTime = p.TotalProcessorTime;
}
However I am getting this error:
Feature is not supported for remote machines.
Does anyone have any other way I can get this information and still be able to add it to my SQL table?