Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I check the CPU usage of processor ?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How can I do for Checking the CPU usage of the processor every 100 microseconds ?
I would like to have the % of cpu usage (like the task manager) and I don't know how I can found it !
 
This can be done using the PDH (Performance Data Helper) DLL, but using it once every 100 usec might put a large load on the CPU itself.

The following routines can help you get started, along with the "perfmon" program in your Win 2000 or WinNT system.
PdhOpenQuery()
PdhCollectQueryData()
PdhGetFormattedCounterValue()

Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top