Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
This behavior may occur if certain extensible counters corrupt the registry, or if some Windows Management Instrumentation (WMI)-based programs modify the registry.
Rebuild the base performance countersExtensible counter information is stored in both of the following locations:
- The following registry subkey:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\Perflib\009
- The %Systemroot%\System32\Perfc009.dat file and the %Systemroot%\System32\Perfh009.dat file
- Expand the Perfc009.dat file and the Perfh009.dat file. These files are located on the Windows Installation Disc. The compressed files are found at DriveLetter:\i386\perfc009.da_ and at DriveLetter:\i386\perfh009.da_. Replace the files that are in the %Systemroot%\System32 folder.
- Start Registry Editor, and then locate the following key in
the registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Perflib
- In the registry, change the Last Counter value to 1846 (decimal), and change the Last Help value to 1847 (decimal).
- Locate the following registry key to search for services that have a Performancesubkey:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services
- Remove the following values from the Performance subkey (if
- First Counter
- First Help
- Last Counter
- Last Help
Note Removing the values from the Performance subkey in the registry may cause any installed .NET Framework applications not to work the next time that they are started. If this occurs, use the lodctr /R command in the "Re-add the extensible counters" section to rebuild the Performance counters. If you continue to have problems when you start a .NET Framework application, see the "Reinstall any custom .NET Framework assembly performance counters" section in this article.
Re-add the extensible countersYou must re-add the extensible counters from the list of services. Before you do this, you must identify the .ini file that is used to load the counters:
- Open a Command Prompt window.
- At the command prompt, type cd %Systemroot%\System32, and then press ENTER.
- At the command prompt, type findstr drivername *.ini, and then press ENTER.
- Note the name of the .ini file for each drivername in the list.
- At the command prompt, type the following command, and then
press ENTER:lodctr <inifile>Note In this command, represents the name of the .ini file for the driver that you want to reload.For example, if you want to reload the ASP driver, the list that you noted in step 4 shows that Axperf.ini is the .ini file for the ASP driver (axperf.ini:drivername=ASP). Therefore, to reload the ASP driver, type lodctr axperf.ini at the command prompt, and then press ENTER.
- Repeat step 5 for each .ini file in the list.
- Restart your computer.
- /R is uppercase. You must have administrative rights on the computer to successfully perform this command.
- On a computer that is running a 32-bit edition of Windows XP, the Lodctr /R:<filename> command is the standard method to restore performance counter registry strings and information by using a file name.
- If you are running a Cluster or Datacenter product, you must fail over the node to refresh the counter list. You must do this after you perform the steps under "Re-add the extensible counters" for both base counters and extensible counters.
- On systems that are running applications that add their own performance counters, such as Microsoft Exchange or SQL Server, the .ini file that is used to load the performance counter may not be located in %Systemroot%\System32. These .ini files can usually be found under the applications folder structure.
- If you receive an error message about the performance library
when you use the previous steps, you may have to unload and reload the IIS
performance dynamic link libraries (DLLs).
For more information
about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:
267831 Event ID 2003 Warning message logged when loading performance counters
- If you continue to experience problems when you start a .NET Framework application, see the "Reinstall any custom .NET Framework assembly performance counters" section.
Reinstall any custom .NET Framework assembly performance countersIf you continue to have problems when you start a .NET Framework application after you perform the procedures that are listed here, you may have to rebuild the Performance counters for the custom .NET Framework application. To do this, use the "/i" option in the .NET Framework Installer Tool (Installutil.exe). You must know the file names of the DLL files that create the Performance counters.
If you follow these procedures and remove the counters from the registry for all services installed on a system that has Microsoft System Center Operations Manager 2007 installed, you might have a broken Management Server. This is because the counters for the Config Service, SDK Service, and Database Write modules are not provided in the form of extensible counters in INI files. Instead, they are registered at the time of installation. Therefore, when you try to start System Center Operations Manager 2007, you may receive an error message that resembles the following because the performance counters are missing:
Event Type: Error
Event Source: OpsMgr SDK Service
Event Category: None
Event ID: 26380
Description: The System Center Operations Manager SDK Service failed due to an unhandled exception.
To resolve this problem in System Center Operations Manager 2007, you must reinstall the .NET Framework assemblies that created the performance counters. To do this, use the /i option in the .NET Framework Installer Tool (Installutil.exe) to reinstall the following assemblies:
InstallUtil /i Microsoft.Mom.Sdk.ServiceDataLayer.dll
InstallUtil /i Microsoft.Mom.DatabaseWriteModules.dll
InstallUtil /i Microsoft.EnterpriseManagement.HealthService.Modules.DataWarehouse.dll