Skip to main content
NetworkAdminKB Logo

Knowledge Base

Go Search
NetworkAdminKB.com
Knowledge Base
VBScript Library
Utilities
  
NetworkAdminKB.com > Knowledge Base > Knowledge Base > Windows2003 > How to correct corrupt Performance Counters  

Knowledge Base: How to correct corrupt Performance Counters

Version HistoryVersion History

Name

How to correct corrupt Performance Counters 

Author Details

Author: NetworkAdminKB.com
Created: 2007-04-27
Modified: 2009-05-16

Article Content

Issue:

When viewing performance counters using Perfmon, the counters show up as random numbers rather than their actual names.

 

Cause:

The performance counters files have become corrupt.  The performance counters are located at %systemroot%\System32\ in two files named Perfc009.dat and Perfh009.dat.

 

Solution:

Retrieve the performance counter files from the Windows Server 2003 installation CD-ROM, then replace the original files.  Update the registry as required.

 

1)      Rename the original files

a.       Rename %systemroot%\System32\Perfc009.dat to Perfc009.old

b.      Rename %systemroot%\System32\Perfh009.dat to Perfh009.old

2)      Locate the compressed file in the I386 directory

a.       Perfc009.da_

b.      Perfh009.da_

3)      Use Expand.exe (located in the I386) directory to uncompress the files.

a.       Expand -r Perfc009.da_ %sytemrot%\System32\Perfc009.dat

b.      Expand -r Perfc009.da_ %sytemrot%\System32\Perfh009.dat

4)      Use Regedit to modify the LastCounter and LastHelp Values

a.       HKLM\Software\Microsoft\Windows NT\CurrentVersion\Perflib

                                                               i.      LastCounter = 1846 (decimal)

                                                             ii.      LastHelp = 1847 (decimal)

5)      Use Regedit to search the following location

a.       HKLM\System\CurrentControlSet\Services

b.      Search for the “Performance” key

a.       In every Performance Key found delete the following values if they exist

                                                               i.      FirstCounter

                                                             ii.      FirstHelp

                                                            iii.      LastCounter

                                                           iv.      LastHelp

2)      Rebuild all performance counters including extensible and third party drivers

a.       Open a command prompt

b.      Run: lodctr /R

                                                               i.      /R is upper case

                                                             ii.      Windows will read all performance counters INI files located in %systemroot%\system32

                                                            iii.      Some applications do not store their performance counter INI files in this location, in which case they must be found in the application directory and loaded manually using: lodctr perffile.ini

 

More Information:

How to manually rebuild Performance Counter Library values

 

Whenever you install a new application that installs performance counters the operating system creates a backup copy of the performance counter registry entries taken prior to the addition of the new application's performance counters file. This backup is saved as a file named PerfStringBackup.ini ONLY if the operating system successfully adds the new application's performance counters.  If the application fails to update the performance counters the PerfStringBackup.ini. file is not changed.  This process means that PerfStringBackup.ini. is never current, and is always missing the performance counters from the last application to successfully install performance counter.  PerfStringBackup.ini is always located in %systemroot%\system32\.

 

To restore the Performance Counter Information using the PerfStringBackup.ini use the following command

 

lodctr /R:PerfStringBackup.ini

 

Note: Running this lodctr command may remove performance counters that were added after the PerfStringBackup.ini backup was created. You may have to reinstall any extensible counters or the programs that installed them.

 

To manually create a backup of all Performance Counters use the following command

 

lodctr /S:MyPerfStrBackup.ini

 

This will create the file MyPerfStrBackup.ini as a backup.

 

Related Articles

How to Load and Unload Performance Counters.aspx; How to Enable or Disable Performance Counters.aspx 
Content Type: Knowledge Base Article
Version: 1.8 
Created at 11/5/2008 10:44 PM  by leslinger 
Last modified at 5/16/2009 12:05 AM  by TEMPLATE\kbadmin 
 
 NetworkAdminKB.com
 Copyright © 2008 NetworkAdminKB.com, All rights reserved. Terms of Use | Contact US