A: 

I think you want Windows Management Instrumentation.

EDIT: See here:

http://stackoverflow.com/questions/1754638/measure-a-process-cpu-and-ram-usage

http://stackoverflow.com/questions/278071/how-to-get-the-cpu-usage-c

Robert Harvey
how do you track process memory and CPU usage with WMI?
Louis Rhys
Yeah, your right. MSDN is running me in circles. I wind up at Performance Counters again.
Robert Harvey
Here we go. See my edit.
Robert Harvey
+2  A: 

For per process data:

Process p = /*get the desired process here*/;
PerformanceCounter ramCounter = new PerformanceCounter("Process", "Working Set", p.ProcessName);
PerformanceCounter cpuCounter = new PerformanceCounter("Process", "% Processor Time", p.ProcessName);
while (true)
{
    Thread.Sleep(500);
    double ram = ramCounter.NextValue();
    double cpu = cpuCounter.NextValue();
    Console.WriteLine("RAM: "+(ram/1024/1024)+" MB; CPU: "+(cpu)+" %");
}

Performance counter also has other counters than Working set and Processor time.

Louis Rhys