开发者

How to log peak commit charge for a system

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜