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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Performance Parameters

Status
Not open for further replies.

SwapSawe

Programmer
Apr 24, 2001
148
0
0
US
Hi!!

Actually I am working on a code where I am required to know what percentage of CPU is being used and how much memory is used at current point of time, as I m executing the program. If I am not clear lets talk something through example, when we go in the task manager in Win NT the details we find in the performance parameter is what i want.

Hope I make it Clear,
Any help would be appreciated.
Regards,
SwapSawe :cool:
 
Use GlobalMemoryStatus function which is great for memory... status... :)...
It fills a MemoryStatus structure with all informations that you would need.
You find the details in MSDN.

A rudimentary way to find the CPU usage will be to invoke the "PMon.exe" utility and gather its output, but that only works for one time needed information, not for a continuously displaying application.

There are some "Performance Monitoring" functions available in NT but i'm not sure if that's what you want to do.

Hope this helps. [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
 
Hi !!
Thanx for the prompt reply, however i couldnot get the pmon.exe u were talking bout. I am using an NT workstation... yes I got the GlobalMemoryStatus function. Thanx a trillion for that.

Hope to hear soon,
Thanx again,
Regards,
SwapSawe.
 
The Pmon unfortunately is not installed by default under windows NT...
However, if you find a function that querries the processor usage, i would be very happy to hear about it... I'm sure there is one, simple enough (that is, doesn't require 126.5321 steps to get to the function) since PMon is using it.
Thanks! [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top