4

I need to find the CPU usage of all the current running processes in the system (windows). I have got the list of processes and their handles using PSAPI. I could not find any usefull function of module to find their CPU usage. I am using C++ and visual studio. Guide Please.

Ubaid R Butt
  • 51
  • 1
  • 6

1 Answers1

0

The best way is to set up Performance Counters (more information here) to track your application. You can do that programmatically via COM API.

Another approach is to use external tools. One of the best is SysInternals Process Monitor. I highly recommend this option.

sophros
  • 11,665
  • 7
  • 38
  • 61