共用方式為


Exctrlst Examples

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Exctrlst Examples

Example 1: Find the performance objects installed on a remote computer

The following procedure uses Exctrlst to find the performance counter objects installed on a remote computer, RK-USER-16. You can use this procedure to determine whether the performance features are installed correctly on a user's system, and you can use the information as an indirect indication of whether a service is installed on the user's system.

In this case, a user is complaining that he cannot monitor the Terminal Services performance counters. You have verified that the counters do not appear in System Monitor.

  1. Start Event Viewer, connect to the RK-USER-16 computer, and search the Application Log for events recorded by Perflib. In this case, none of the events report a problem with the Terminal Services counters.

  2. Start Exctrlst.

  3. In the Machine Name box, type RK-USER-16, and then click Refresh.

  4. In the Sort Order section, click Service.

The Extensible Performance Counter box now lists all of the performance counters installed on the remote computer. In this case, the Terminal Services service, TermService service and its DLL, Perfts.dll, do not appear in the list. This indicates that Terminal Services performance counters are not installed on the user's computer.

Note

  • You cannot copy or export a list from Exctrlst. However, you can use the query operation of Reg.exe, a command-line tool in %windir%\system32, to list all services that have installed performance counters on a system.

    At the command prompt, type:

    reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services /v Performance /s > PerfServices.txt

    This command creates a file called PerfServices.txt with the names of all services that have Performance subkeys in the registry. It also lists occurrences of the Disable Performance Counters registry entry and its value.

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. This procedure compares performance object lists from Exctrlst and Typeperf, a tool included in Windows XP Professional and Windows Server 2003. Because Typeperf only displays objects that load and run properly, objects that appear in Exctrlst but not in Typeperf are likely to have errors.

  1. Check the Application Log in Event Viewer for events recorded by Perflib. When a counter DLL fails the reliability tests of the system or does not install properly, Perflib records errors in the log.

    In this case, there are no events pertaining to the Reskit service.

  2. Use Exctrlst to verify that the counter is installed on the system.

    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.

  3. Use Exctrlst to determine whether the counter DLL for the Reskit service is disabled.

    In this case, when you click the Reskit service item, the Performance Counters Enabled check box is checked, indicating that the Reskit service performance DLL passed the run-time reliability tests of the system.

  4. Use Typeperf to load and display all properly loading performance counters on the system. Then, look for the Reskit performance object in the Typeperf list.

    The following command writes a list of all properly loading performance counters to the C:\Counters.txt file:

    typeperf -q -o C:\Counters.txt

    In this case, the Reskit 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 Typeperf. 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 retrieves extreme data values not anticipated in the program design.

Counter DLLs might also be enabled but not load properly in Typeperf 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 permits the system to disable faulty counters, is 0x10.

For information about the Configuration Flags registry entry, search the Registry Reference of the Windows Server 2003 Resource Kit.

Example 3: Re-enable performance counters

The following procedure re-enables the performance counter DLL for Reskit, a fictitious service.

To protect the performance monitoring capabilities of the system, the Performance Library (Perflib) tests all performance DLLs when they load and disables performance DLLs that fail its run-time reliability tests. In this case, when the system found that the Reskit performance DLL, Rkperf.dll, generated an exception, it disabled the DLL. The developer repaired Rkperf.dll, but it is still disabled in the system.

The following procedure uses Exctrlst to re-enable the performance counters for the Reskit service:

  1. Start Exctrlst.

  2. In the Extensible Performance Counters list, click the Reskit service.

  3. Click to select the Performance Counters Enabled check box.

  4. Click Refresh.

  5. Use Typeperf to verify that the counter DLL loads and runs properly.

Typeperf attempts to load and run all installed performance counter DLLs. It lists the performance objects that successfully loaded in the order in which they load (alphabetical order by service name). In this case, the performance objects created by Rkperf.dll appear in Typeperf, indicating that the DLL repair was successful and the Reskit performance objects and counters are enabled and ready for use.

Note

  • You cannot copy or export a list of disabled performance DLLs from Exctrlst. However, you can use Regfind, a command-line tool in the Windows 2000 Server Resource Kit, to list all instances of the Disable Performance Counters registry entry in the Services subkeys. When the value of this entry is 1, the performance DLL for the service, and the objects and counters it creates, are disabled.

    At the command prompt, type:

    regfind "Disable Performance Counters" -n -p HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services > Disabled.txt

    This command creates a file called Disabled.txt with the names of all services that have the registry entry. You can then search the file for entries with a value of 1.

Example 4: Find the performance objects for a service

The following procedure comprises one method for determining which performance objects are associated with a service:

  1. To list all performance counters that are enabled and operating properly on the system, use Typeperf, a tool included in Windows XP Professional and Windows Server 2003. For information about this tool, see "Typeperf" in Help for Windows Server 2003. At the command prompt, type:

    typeperf /q > all.txt

    This command saves the performance counter list in the All.txt file.

  2. To disable the performance counters for the service, use Exctrlst.

  3. Run Typeperf again. At the command prompt, type:

    typeperf /q > no_svc.txt

    This command saves the revised performance counter list in the No_Svc.txt file. This time, the disabled performance counters do not appear in the list.

  4. Use a comparison tool, such as Ec, to compare the output from the Typeperf runs. For information about using Ec, see "Ec" in Help for Windows Server 2003. The counters that are missing from the No_Svc.txt file are those associated with the service.

  5. Use Exctrlst to re-enable the counters for use.

See Also

Concepts

Exctrlst Overview
Exctrlst Remarks
Exctrlst UI
Alphabetical List of Tools
Pviewer Overview
Devcon Overview
Apmstat Overview