Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6061033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:53:33+00:00 2026-05-23T08:53:33+00:00

I’d like to my Windows C++ program to be able to read the number

  • 0

I’d like to my Windows C++ program to be able to read the number of hard page faults it has caused. The program isn’t running as administrator. Edited to add: To be clear, I’m not as interested in the aggregate page fault count of the whole system.

It looks like ETW might export counters for this, but I’m having a lot of difficulty figuring out the API, and it’s not clear what’s accessible by regular users as compared to administrators.

Does anyone have an example of this functionality lying around? Or is it simply not possible on Windows?

(OT, but isn’t it sad how much easier this is on *nix? gerusage() and you’re done.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:53:33+00:00Added an answer on May 23, 2026 at 8:53 am

    afai can tell the only way to do this would be to use ETW (Event Tracing for Windows) to monitor kernel Hard Page Faults. The event payload has a thread ID that you might be able to correlate with an existing process (this is going to be non-trivial btw) to produce a running per-process count. I don’t see any way to get historical information per process.

    I can guarantee you that this is A Hard Problem because Process Explorer supports only Page Faults (soft or hard) in its per-process display.

    http://msdn.microsoft.com/en-us/magazine/ee412263.aspx

    A page fault occurs when a sought-out
    page table entry is invalid. If the
    requested page needs to be brought in
    from disk, it is called a hard page
    fault (a very expensive operation),
    and all other types are considered
    soft page faults (a less expensive
    operation). A Page Fault event payload
    contains the virtual memory address
    for which a page fault happened and
    the instruction pointer that caused
    it. A hard page fault requires disk
    access to occur, which could be the
    first access to contents in a file or
    accesses to memory blocks that were
    paged out. Enabling Page Fault events
    causes a hard page fault to be logged
    as a page fault with a type Hard Page
    Fault. However, a hard fault typically
    has a considerably larger impact on
    performance, so a separate event is
    available just for a hard fault that
    can be enabled independently. A Hard
    Fault event payload has more data,
    such as file key, offset and thread
    ID, compared with a Page Fault event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.