views:

60

answers:

1

How to get CPU and RAM usage for each process in C# using WMI ? I want to do something like windows Task Manager just simpler.

Best regards.

EDIT:

OK, after some testing I found few isues: 1. Process class from System.Diagnostic has to many limitations when dealing with remote system 2. WMI to remote computer is very slow, about 15 sec to connect

What are my other options ?

+2  A: 
Michael
Thank you, on this links is all I need.
Primoz
OK, after some testing I found few isues:1. Process class from System.Diagnostic has to many limitations when dealing with remote system 2. WMI to remote computer is very slow, about 15 sec to connect.What are my other options ?
Primoz
This actually changes the scope of your project. You've now introduced the fact that you are requesting information from a remote system. If speed is an issue (due to the constraints Windows places on remote WMI), consider creating a service (collector) on the client machine. Collect the data by creating a socket to the client service (or using remoting methods in WCF).
Michael