Memory Usage

Hi,

We need to check how much RAM used by our C++ Console Application using Perfmon. I checked almost all the available Counters. But I am not able to figure out which counter can be used to get the RAM usage by a process.

I would like have counter that Task manager uses (How Windows does this calcuation :confused: ) to show Mem Usage by each process.

Anybody can help me in this regard ?

Thanks in advance
[445 byte] By [chilakamati] at [2007-11-19 14:53:01]
# 1 Re: Memory Usage
If u r using PDH library then u can use "\\Working Set" counter and if u r using GetProcessMemoryInfo then as like above WorkingSetSize is used.
Naumaan at 2007-11-10 3:40:16 >
# 2 Re: Memory Usage
Why does it have to be the performance monitor? Taskmanager will give you all that just as well as the performance monitor.
PeejAvery at 2007-11-10 3:41:27 >
# 3 Re: Memory Usage
Why does it have to be the performance monitor? Taskmanager will give you all that just as well as the performance monitor. ...
Performance Monitor gives Logs and Alerts functionality. Performance Logs and Alerts contains features for logging counter and event trace data and for generating performance alerts. With counter logs, you can record data about hardware usage and the activity of system services from local or remote computers. Logging can occur manually on demand, or automatically based on a user-defined schedule. Continuous logging, subject to file-size or duration limits, is also available. Logged data can be viewed using the System Monitor display or can be exported to spreadsheet programs or databases for analysis and report generation...Windows Task Manager provides information about computer performance, and programs and processes running on the computer. Using Windows Task Manager, you can end programs or processes, start programs, and view a dynamic display of your computer's performance.
Naumaan at 2007-11-10 3:42:26 >