简体   繁体   English

.NET PerformanceCounter for Hard Faults / sec

[英].NET PerformanceCounter for Hard Faults/sec

Vista's Resource Monitor includes a reading for "Hard Faults/sec". Vista的资源监视器包含“硬故障/秒”的读数。 Is there an equivalent performance counter I can use in C# to get this reading? 我可以在C#中使用等效的性能计数器来获取此读数吗? I've tried the "Page Faults/sec" under the memory category, but that appears to be something different. 我在内存类别下尝试过“Page Faults / sec”,但这看起来有些不同。

A hard fault is the same as a page fault. 硬故障与页面错误相同。

Source: " Windows Vista Performance and Reliability Monitoring Step-by-Step Guide ". 资料来源:“ Windows Vista性能和可靠性监控循序渐进指南 ”。

See section Resource View details , Label Memory (the 4th table): 请参阅资源视图详细信息 ,标签内存(第4个表)部分:

A hard fault (also known as a page fault) occurs when the page of the referenced address is no longer in physical memory and has been swapped out or is available from a backing file on disk. 当引用地址的页面不再位于物理内存中并且已被换出或可从磁盘上的后备文件获得时,会发生硬故障(也称为页面错误)。

Page faults/sec measures both Hard Faults and Soft Faults. 页面错误/秒测量硬故障和软故障。 The counter named Transition Faults/sec measures Soft Faults. 名为Transition Faults / sec的计数器测量软故障。 Thus, to get the Hard Faults you should subtract Transition Faults/sec from Page Faults/sec 因此,要获得硬故障,您应该从Page Faults / sec中减去Transition Faults / sec

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM