views:

470

answers:

2

I am doing a project on a centralized LAN management system. I need to know how many CPU cycles is each process of a remote PC consuming(as in a Task Manager )so that the network admin can close few processes,in case the CPU utilization of a system in network goes beyond acceptable rates..

I would like to know if there is a Win32 API for this requirement of mine n if so ,i request you to give me information about it..

thank you in advance..

A: 

You need to look at the performance monitor system. You can get the stats from there (in the Process counter).

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

When you understand how it all works, you then need the Performance Counters API to read the data counters.

gbjbaanb
A: 

Win32 API has lots of functions to find all kinds of information about 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

Explore the list and you should be able to find the function(s) there that meet your requirements, for example GetProcessTimes() returns structures that contain the amounts of time the process has executed in kernel mode, in user mode, etc.

azheglov