Error Message: “Performance Counters are Disabled or Corrupt”
Parts of the .NET Framework have a dependency on the performance counter.
A note from Microsoft about the dependency:
System.Diagnostics.Proccess FAQ:Why does the Process class have a dependency on the performance counter?
Occasionally, the files perfc009.dat and perfh009.dat can become corrupted after a Service Pack update.
Before modifying the Registry it is recommended that you perform a back up:
Microsoft Support: How to back up and restore the registry in Windows XP
Parts of the below solution were taken from:
Microsoft Support: PRB: Performance Object Is Not Displayed in Performance Monitor
Microsoft Support: How to manually rebuild Performance Counter Library values
Step 1: Enable Performance Counters by modifying the Registry
- Click Start…Choose Run
- Type Regedit.exe and press the ENTER key.
- Select Find from the Edit menu.
- In the Find What field, type Disable Performance Counters.
- Click Find Next.
- If the Registry value is set to 1, set the value to 0.
- Press the F3 key to find the next occurrence of this Registry value.
- Repeat the previous two steps until there are no Performance keys that have the Disable Performance Counters value set to 1.
Step 2: Copy perfc009.dat and perfh009.dat into the %Systemroot%\System32\ folder.
- Expand the Perfc009.dat file and the Perfh009.dat file. These files are located on your Windows Installation Disc. The compressed files are found at DriveLetter:\i386\perfc009.da_ and at DriveLetter:\i386\perfh009.da_. You should be able to expand/extract the files with something a program such as WinZip or WinRAR.
- Click Start…Choose Run.
- Type %Systemroot%\System32\ and press the ENTER key.
- Make a backup of the files perfc009.dat and perfh009.dat – if they exist (with a .bak extension just in case you need them later).
- Take the files you expanded above and replace the files that are in the %Systemroot%\System32\ folder.
- Restart your computer
Windows 7 and Windows Vista:
To rebuild all performance counters type the following commands at a Command Prompt. Press ENTER after each command.
- cd %Systemroot%\System32\
- lodctr /R
- You can get to the Command Prompt by typing Command Prompt in the Search box on the Start menu.
- /R is uppercase. You must have administrative rights on the computer to successfully perform this command.
- Make sure you run the command prompt as an administrative user.
- Reboot your machine after these steps.