Finding all of the processes
You can do this through the Process class
using System.Diagnostics;
...
var allProcceses = Process.GetProcesses();
Running Diagnostics
Can you give us some more information here? It's not clear what you want to do.
The process class provides a bit of information though that might help you out. It is possible to query this class for
- All threads
- Main Window Handle
- All loaded modules
- Various diagnostic information about Memory (Paged, Virtual, Working Set, etc ...)
- Basic Process Information (id, name, disk location)
EDIT
Op mentioned they want to get memory and CPU information. These properties are readily available on the Process class (returned by GetProcesses()). Below is the MSDN page that lists all of the supported properties. There are various memory and CPU ones available that will suite your needs.
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx