How to manually rebuild Performance Counters for Windows Server 2008 64bit or Windows Server 2008 R2 systems

Article ID: 2554336 - View products that this article applies to.
Expand all | Collapse all

Symptoms

When you use the Performance Monitor tool, some counters may be missing or do not contain counter data. The performance counter libraries may become corrupted and need to be rebuilt.
You may see the following errors in the application log:

Log Name: Application
Source: Microsoft-Windows-IIS-W3SVC-PerfCounters
Event ID: 2002
Level: Error
Keywords: Classic
Description:
Setting up Web Service counters failed, please make sure your Web Service counters are registered correctly.

Log Name: Application
Source: IISInfoCtrs
Event ID: 1001
Level: Error
Keywords: Classic
Description:
Unable to read the first counter index value from the registry. The error code returned by the registry is data DWORD 0.

Cause

This behavior may occur if certain extensible counters corrupt the registry, or if Windows Management Instrumentation (WMI)-based programs modify the registry. 

Resolution

Ensure that the counters are not disabled in the registry


The counters may be disabled via registry settings. Please check the following registry locations to ensure that the counters have not been disabled.

HKLM\System\CurrentControlSet\Services\%servicename%\Performance

%servicename% represents any service with a performance counter. For example: PerfDisk, PerfOS, etc.


There may be registry keys for "DisablePerformanceCounters" in any of these locations. As per the following TechNet article, this value should be set to 0. If the value is anything other than 0 the counter may be disabled.


Disable Performance Counters
http://technet.microsoft.com/en-us/library/cc784382.aspx

A value of 1 means the counter is disabled.
A value of 2 means the 32-bit counter is disabled.
A value of 4 measn the 64-bit counter is disabled.

 

Rebuilding all performance counters including extensible and third-party counters


To rebuild all Performance counters including extensible and third-party counters, type the following commands at an Administrative command prompt. Press ENTER after each command.

Rebuilding the counters:
     cd c:\windows\system32
     lodctr /R
     cd c:\windows\sysWOW64
     lodctr /R

Resyncing the counters with Windows Management Instrumentation (WMI):
     WINMGMT.EXE /RESYNCPERF

Stop and restart the Performance Logs and Alerts service. 
Stop and restart the Windows Management Instrumentation service.

Create a new Data Collector Set (do not use an existing Data Collector Set).

 

For a number of counters, the location of the “ini” files to install perf counters is under “windows\winsxs”, e.g. those for IIS:

If you see the following errors:

Log Name: Application
Source: Microsoft-Windows-IIS-W3SVC-PerfCounters
Event ID: 2002
Level: Error
Keywords: Classic
Description:
Setting up Web Service counters failed, please make sure your Web Service counters are registered correctly.

Log Name: Application
Source: IISInfoCtrs
Event ID: 1001
Level: Error
Keywords: Classic
Description:
Unable to read the first counter index value from the registry. The error code returned by the registry is data DWORD 0.


You will need to use the counter install ini files in the following directory "c:\Windows\winsxs".

It is possible that multiple folders exist for counters that you need to repair.
In those cases, you might need to use trial and error to find the correct ini files.
E.g:

Dir C:\Windows\winsxs\amd64_microsoft-windows-iis-metabase*

In this example, try installing the infoctrs.ini from each folder using:

Lodtr infoctrs.ini

When it is successful, you will see the following entry in the application log:

Log Name: Application
Source: Microsoft-Windows-LoadPerf
Event ID: 1000
Level: Information
Description:
Performance counters for the inetinfo (inetinfo) service were loaded successfully. The Record Data in the data section contains the new index values assigned to this service.

The same needs to be done for the following counters:

amd64_microsoft-windows-iis-w3svc*

lodctr w3ctrs.ini

After which you will see:

Log Name: Application
Source: Microsoft-Windows-LoadPerf
Event ID: 1000
Level: Information
Description:
Performance counters for the W3SVC (World Wide Web Publishing Service) service were loaded successfully. The Record Data in the data section contains the new index values assigned to this service.

Following these steps, re-run "WINMGMT /RESYNCPERF"

More Information

Please note, there is a hotfix for known issues with PerfDisk.dll on Windows Server 2008 and Vista systems. This hotfix has been rolled into SP2 for these operating systems. If you are at SP1 or below, please apply the following hotfix:

961382 An application crashes after the application loads the Perfdisk.dll file on a computer that is running Windows Server 2008 or Windows Vista if there are lots of disk devices on the computer
http://support.microsoft.com/default.aspx?scid=kb;EN-US;961382

 

Additional Information:

971714 The report generation process may stop responding when you run Perfmon.exe with the Active Directory Diagnostics template to generate a report on a Windows Server 2008-based domain controller
http://support.microsoft.com/default.aspx?scid=kb;EN-US;971714

969639 Error message when you try to access the Performance Monitor (Perfmon.exe) on a remote computer: "Access Is Denied"
http://support.microsoft.com/default.aspx?scid=kb;EN-US;969639

300956 How to manually rebuild Performance Counter Library values
http://support.microsoft.com/default.aspx?scid=kb;EN-US;300956

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2554336 - Last Review: May 27, 2014 - Revision: 3.0
Applies to
  • Windows Server 2008 Datacenter
  • Windows Server 2008 Enterprise
  • Windows Server 2008 R2 Datacenter
  • Windows Server 2008 R2 Enterprise
  • Windows Server 2008 R2 Service Pack 1
  • Windows Server 2008 R2 Standard
  • Windows Server 2008 Service Pack 2
  • Windows Server 2008 Standard
Keywords: 
KB2554336

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com