PfMon

Windows NT only

PFMon displays the faults that occur while executing a process. PFMon can start the application for you or attach to a running process.

The following is the PFMon command-line syntax:

pfmon [options] [AppCommandLine]

-?
Display the command-line syntax.
-n
Do not display running faults; log faults to PFMON.LOG.
-l
Log faults to PFMON.LOG.
-c
Only show code faults.
-h
Only show hard faults.
-p pid
Attach to the process with process identifier pid. Note that once PFMon is attached to the process, terminating PFMon will also terminate the process.
-d
Use tab-delimited database format.
-k
Show kernel mode page faults and user mode page faults.
-K
Show kernel mode page faults.
AppCommandLine
The command line of the application to monitor. Do not specify AppCommandLine if you are using -p pid.

When you terminate the application specified by AppCommandLine, PFMon prints a summary of the faults that occurred while executing the application. For example, execute the following command:

pfmon wperf

The summary printed when you terminate WPERF will look something like this:

wperf.dbg Caused     44 faults had     5 Soft   24 Hard faulted VA's
ntdll.dbg Caused     99 faults had    63 Soft    4 Hard faulted VA's
kernel32.dbg Caused  46 faults had    29 Soft    4 Hard faulted VA's
gdi32.dbg Caused     17 faults had     9 Soft    3 Hard faulted VA's
user32.dbg Caused    29 faults had    21 Soft    6 Hard faulted VA's
advapi32.dbg Caused   7 faults had     2 Soft    8 Hard faulted VA's
rpcrt4.dbg Caused     4 faults had     1 Soft    3 Hard faulted VA's

Total Faults 246 (KM 135 UM 246 Soft 164, Hard 82, Code 123, Data 123)