Microsoft KB Archive/300956

= How to manually rebuild Performance Counter Library values =

Article ID: 300956

Article Last Modified on 3/2/2007

-

APPLIES TO


 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition

-



This article was previously published under Q300956



Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SUMMARY
This article describes how to manually rebuild the performance counter library values.

Important The information in this article only applies to English-language versions of Windows 2000.



MORE INFORMATION
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

When you use the System Monitor tool, some counters may be missing or do not contain counter data. The base set of performance counter libraries may become corrupted and may need to be rebuilt along with any extensible counters. This behavior may occur if certain extensible counters corrupt the registry, or if some Windows Management Instrumentation (WMI)-based programs modify the registry.

Extensible counter information is stored in both of the following locations:  The following registry key:

 The %Systemroot%\System32\Perfc009.dat file and the %Systemroot%\System32\Perfh009.dat file.

To rebuild the base performance counter libraries manually:  Expand the Perfc009.dat file and the Perfh009.dat file. These files are located on the Windows 2000 CD-ROM. The compressed files are found at :\i386\perfc009.da_ and at  :\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:

 In the registry, change the LastCounter value to 1846 (decimal), and change the LastHelp value to 1847 (decimal).</li> Locate the following registry key to search for services that have a  subkey:

</li> Remove the following values from the  subkey (if they exist):  FirstCounter</li> FirstHelp</li> LastCounter</li> LastHelp</li></ul>

You can also use the Exctrlst.exe tool to locate the performance counter dynamic-link library files (DLLs) that are installed, and then access the registry to remove the DWORD values. You now have a workable performance registry that contains only system base counters.</li></ol>

After you have completed this procedure, you must re-add the extensible counters from the list of services. Before you do so, however, you must identify the .ini file that is used to load the counters: <ol> Open a command prompt window.</li> At the command prompt, type cd %Systemroot%\System32, and then press ENTER.</li> At the command prompt, type findstr drivername *.ini, and then press ENTER.</li> Note the name of the .ini file for each drivername in the list.</li> At the command prompt, type the following line, and then press ENTER:

lodctr

where  is 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.</li> Repeat step 5 for each .ini file in the list.</li> Restart your computer.</li></ol>

To rebuild all Performance counters including extensible and third party counters in Windows Server 2003, type the following commands at a command prompt. Press ENTER after each command.

cd \windows\system32

lodctr /R

Note /R is uppercase.

Windows Server 2003 rebuilds all the counters because it reads all the .ini files in the C:\Windows\inf\009 folder for the English operating system.

Note If you are running a Cluster or Datacenter product, you must fail over the node to refresh the counter list after doing the preceding steps for both base counters and extensible counters.

Note 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.

Note If you receive an error message about the performance library when you use the preceding 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

Additional query words: perfmon tshoot

Keywords: kbenv kbhowto KB300956

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.