Windows Tools

ShowPerf Notes

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

Concepts

Showperf generates its display by loading and running each performance DLL, extracting data from the performance registry, and displaying the contents of the data buffer for each performance counter. If a performance DLL does not load or run properly, the performance objects for the service do not appear in ShowPerf.

ShowPerf does not display performance objects and counters that the system disables because they fail the system's run-time reliability tests for performance counter DLLs. Because a faulty performance DLL can corrupt all performance data and prevent System Monitor and other tools from displaying any performance data, the system tests all DLLs on load. If a DLL fails the test, the system disables all performance counters associated with the service. These counters do not display in ShowPerf, in System Monitor, or in performance tools based on the System Monitor control.

You can use Exctrlst, a tool in the Windows XP Professional Support Tools folder, to get a complete list of the performance counters installed on the system. By comparing the list of all counters from Exctrlst to the list of operating counters from ShowPerf, you can find the counters that did not load properly or failed the reliability tests.

You can also examine the contents of the data buffers returned for each counter that loaded successfully. If the data is obviously wrong, either the counter has been assigned the wrong counter type or the DLL collection method is not working properly.

For more information

For information about counter types and for descriptions of the performance counters installed on Windows XP Professional, see the Performance Counter Reference at the Microsoft Windows XP Professional Resource Kits Web site (http://www.microsoft.com/).

For information about the run-time reliability tests for performance counters, and to customize the tests for your system, search for "Configuration Flags" in the Registry Reference at the Microsoft Windows XP Professional Resource Kits Web site (http://www.microsoft.com/).

To view all installed performance counters and to enable and disable performance counters, use Exctrlst, a Windows Support Tool.

To list the performance counters on a local or remote system from the command line, use Typeperf, a tool included in Windows XP Professional.

To see a graphic display of performance counter data, use System Monitor. To run System Monitor, at the command prompt or in the Run dialog box, type Perfmon.

Disabled Performance Objects

In Windows NT, defective or poorly constructed performance DLLs could disable the performance monitoring features of the operating system. To prevent this situation, in Windows 2000 and Windows XP Professional, the Performance Library tests the basic structures of each performance counter DLL when it loads. If the DLL fails these basic tests, the system disables the counter DLL.

Performance objects that are installed, but disabled, do not display in ShowPerf or in other tools that display performance counter data, such as System Monitor. If a performance object is missing from the ShowPerf list, the object might be disabled.

To disable the performance objects for a service, the system adds the Disable Performance Counters registry entry to the Performance subkey for the service (HKLM\SYSTEM\CurrentControlSet\Services\ServiceName\Performance) and sets the value of the entry to 1.

To re-enable performance objects after the DLL is replaced or repaired, use Exctrlst, or set the value of the Disable Performance Counters registry entry to 0 or delete the entry.

For more information about the Disable Performance Counters registry entry, see the Registry Reference in the Windows XP Professional Resource Kit.

Tips

Event Viewer is one of the most valuable tools for diagnosing problems with performance counters. When the system detects a serious error in a performance counter DLL, it disables the counter and records Event 1016 in the Application Log in Event Viewer. If a performance counter does not appear in System Monitor or if it does not operate properly, check the Application log for events generated by Perflib.

To list all services that have performance counters installed on the system, use Regfind, a command-line tool in the Windows 2000 Server Resource Kit.

At the command prompt, type:

regfind "Performance" -n -p HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

In response, Regfind lists all services that have a Performance subkey. This subkey indicates that the service has installed performance counters on the system.

To list services whose performance counters are disabled, use Regfind to search for the Disable Performance Counters registry entry.

At the command prompt, type:

regfind "Disable Performance Counters" -n -p HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

In response, Regfind lists all instances of the registry entry and its value. When the value of this entry is 1, all performance objects and counters for the service are disabled.