Windows Tools

ShowPerf Examples

Overview | Notes | UI | Examples | Related Tools Run Tool

Example 1: View the raw data for a performance counter.
Example 2: Find a missing performance object.

Example 1: View the raw data for a performance counter

The following procedure uses ShowPerf to examine the data retrieved from the performance registry for the % Usage counter of the Paging File performance object. In this case, the user doubts that the value shown in System Monitor, 18.56, is correct.

  1. From the Object box, select Paging File.
  2. From the Instance box, select \??\C:\pagefile.sys, the paging file on the system drive.

The data in the Counter box reveals the two elements that comprise the %Usage value, a raw fraction counter type in the numerator and a raw base counter type in the denominator. These counter elements have the following current value, as shown in the Counter Data column.

Index Counter Name Counter Type Counter Data
702 % Usage Raw Fraction 0x00002396 (9110)
702 % Usage Raw Base 0x0000c000 (49152)

Using the decimal values shown in parentheses, the paging file consists of 49,152 KB of which 9,110 KB are used. This explains the data shown in System Monitor.

Clicking Refresh updates the data. However, the data for this counter does not change significantly.

If the data does not accurately reflect the size of the paging file or the bytes used, as determined by using other sources, then the paging file counter DLL must be corrected.


Example 2: Find a missing performance object

The following procedure determines why the performance object for a fictitious service, Reskit, does not appear in System Monitor:

  1. Check the Application Log in Event Viewer for events recorded by Perflib. When a counter DLL fails the system's reliability tests, Perflib records Event 1016 in the log.
  2. In this case, the event does not appear in the log.

  3. Use Exctrlst to list all performance counters installed on the system.
  4. If a counter does not appear in the Exctrlst display, then it is not installed or properly registered in the system.

    In this case, the Reskit service is listed in Exctrlst, and its performance counter DLL, Reskit.dll, is listed in its proper location.

  5. Use Exctrlst to determine whether the performance counter DLL for the Reskit service is disabled.
  6. In this case, the Performance Counters Enabled check box in Exctrlst is checked, indicating that the Reskit service performance DLL passed the system's run-time reliability tests.

  7. Use ShowPerf to load the performance counters on the system. Then, look for the Reskit performance object in the ShowPerf Object drop-down list.
  8. In this case, the object does not appear in the list. This indicates that the Reskit performance DLL passed the basic reliability tests, but does not load properly in ShowPerf. This rare situation occurs when a DLL has a fault that is not evident in basic testing but appears later, such as when the service is stressed by high use or retrives extreme data values not anticipated in the program design.

Counter DLLs might also be enabled but not load properly in ShowPerf because one or more of the run-time reliability tests have been turned off, or because the system is prevented from disabling performance counters that fail its tests. To check for this occurrence, find the value of the Configuration Flags registry entry (HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\Configuration Flags). The default value, which allows the system to disable faulty counters, is 0x10.

For information about the Configuration Flags registry entry, see the Registry Reference at the Microsoft Windows XP Professional Resource Kits Web site (