简体   繁体   中英

.NET PerformanceCounter for Hard Faults/sec

Vista's Resource Monitor includes a reading for "Hard Faults/sec". Is there an equivalent performance counter I can use in C# to get this reading? I've tried the "Page Faults/sec" under the memory category, but that appears to be something different.

A hard fault is the same as a page fault.

Source: " Windows Vista Performance and Reliability Monitoring Step-by-Step Guide ".

See section Resource View details , Label Memory (the 4th table):

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. Thus, to get the Hard Faults you should subtract Transition Faults/sec from Page Faults/sec

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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