1

Are there any classes in WMI that can help me extract the Peak Memory Commit Charge for a system? The value can be viewed in Task Manager/"Commit Charge (K)"/"Peak", however, I would like to be able to export this value programatically using .NET.

Myishmael
  • 113
  • 1
  • 5
  • 1
    Other related values can be read from Performance Counters. However, it looks like there isn't one for this particular value, so I don't know how you'd get it. Here's a page that lists some related counters, in case it's helpful: http://technet.microsoft.com/en-us/library/cc958260.aspx – Nate C-K Aug 23 '11 at 19:55
  • Ya I went down that road already, thanks though. – Myishmael Aug 23 '11 at 20:04

1 Answers1

0

Going to post Nate C-K's answer as Community Wiki.

There is no performance counter corresponding to the Peak Commit Charge figure. There is a table on TechNet confirming that no counter exists that corresponds to this metric.

So the only way you can log it is to query the number using NtQuerySystemInformation. A PowerShell sample is available. You could even expose it as a performance counter of your own, which can then be consumed like any other performance counter.

Roman Starkov
  • 59,298
  • 38
  • 251
  • 324