CPU utilization for each process in Win32 API

I am doing a project for a centralized LAN control system. I need to know how many CPU cycles are each process on the remote PC consuming (as in the task manager) so that the network administrator can shut down multiple processes in case the CPU usage on the network goes beyond acceptable rates.

I would like to know if there is a Win32 API for this my n requirement, if so I ask you to provide me with information on this.

early.

+1


source to share


2 answers


The Win32 API has many functions for finding all kinds of information about the currently running processes and threads, here's a link to the full list of them: http://msdn.microsoft.com/en-us/library/ms683223(VS.85).aspx



Examine the list and you should find functions there that match your requirements, for example GetProcessTimes () returns structures that contain the amount of time the process has taken in kernel mode, user mode, etc.

+1


source


You need to look at a performance monitoring system. You can get statistics from there (in the Process counter).

Here's a (delphi) explanation of this, it's pretty good and easy to understand.



Once you understand how it all works, you need performance counters to read the data counters.

0


source







All Articles