Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,

I have a process running in my machine.I need to calculate the CPU usage of that particular process in C#. The running process is a totally separate process apart from the Visual Studio. I think this could be achieved by using ManagementObjectSearcher class of System.Management namespace, but I am unable to write code to do it.
Posted

1 solution

 
Share this answer
 
Comments
Khatkole Komal 12-Sep-13 8:06am    
thank you very much !
similarly, Can i calculate memory usage of a process?
CB Sharma 12-Sep-13 8:42am    
Here is link

http://social.msdn.microsoft.com/Forums/vstudio/en-US/d2c6483e-0e53-4904-b2a7-1891c0a1253d/c-memory-usage-for-a-process-and-compare-to-windows-task-manager

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900