开发者

How to log peak commit charge for a system

开发者 https://www.devze.com 2023-03-30 19:11 出处:网络
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

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

精彩评论

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

关注公众号