How to Rebuild Corrupted Performance Counters in Windows With lodctr /R

Last reviewed: November 25, 2026. This guide on performance counters corrupted problems was compared with Microsoft documentation, and none of its steps were run on a real PC.
When performance counters corrupted problems appear, Performance Monitor may show a counter as empty, missing or in error, or it may refuse to add the counter at all. This guide explains what the counters are, how to diagnose the problem without changing anything, and how to rebuild the counter settings with the built-in lodctr command, starting with a backup. For more Windows repair topics, browse our PC repair guides.
Performance counters corrupted: quick answer
Quick answer
- Performance counters are the named measurements that Performance Monitor and other tools read. Their names and help text are commonly described as kept in a central registry area, and that area can fall out of step with the programs that provide the counters.
- Start with look-only checks: open Performance Monitor, note which counters fail, and read the Application log for counter-related errors.
- Back up first. Create a restore point and export the Perflib key before any repair step.
- The repair route we describe uses lodctr with the /R parameter. Microsoft describes /R as restoring counter registry settings and explanatory text from current registry settings and cached performance files. Run it from an elevated Command Prompt, restart, and retest.
- Counters from a third-party app may need that app's own repair or reinstall. If lodctr does not help, check system files with DISM and SFC, and do not edit registry values by hand.
In this guide
- Performance counters corrupted: quick answer
- What performance counters are
- Symptoms and what they usually mean
- Before you change anything
- Look-only diagnosis first
- Where the problem sits: a route
- Rebuild the counters with lodctr /R
- If lodctr /R does not help
- What not to do
- When to stop and get help
- Frequently asked questions
- How this guide was checked
- Sources
What performance counters are
Windows performance counters give one standard way to collect system measurements, such as processor, memory and disk use. Microsoft describes them as a framework that system administrators use to watch for performance or behaviour problems, and that software developers use to inspect the resource use of their components.
Microsoft's overview also breaks the framework into parts. A counterset works like a table, a counter like a column, an instance like a row, and a counter value like a single cell. The component that publishes the data is called a provider. Older V1 providers are installed from an initialisation file, and newer V2 providers from a manifest file.
Where the names live
A tool can only show a counter if it knows the counter's name and help text. For V1 providers, those names and help strings are generally described as kept in a central registry area under Perflib. We did not confirm the exact subkey path, so this guide does not give a registry path for you to edit. The Perflib key appears only in the read-only reg export step below, which makes a backup and is never edited. Service-based counters are also recorded under the CurrentControlSet key; for a look-only explanation of that key and its ControlSet001 and ControlSet002 copies, see what CurrentControlSet, ControlSet001 and ControlSet002 are.
What lodctr and unlodctr do
The lodctr tool registers a provider's counter definitions in that registry area. The unlodctr tool is generally described as removing them again. When the area and the providers get out of step, counters can appear empty, missing or broken. That explanation is commonly reported for this problem, but we did not find one Microsoft page that confirms it for every case, so treat it as the likely cause, not a proven one.
Symptoms and what they usually mean
Match what you see with the table below. Each row gives a likely meaning and one check you can make without changing anything.
| Symptom | What it usually means | First look-only check |
|---|---|---|
| A counter shows no data or stays at zero | The counter is not registered, or its provider is not running | Restart once and see whether the counter returns |
| The message Unable to add these counters | Counter names are missing from the registry area | Write down the exact counter names and the message text |
| A counter is listed but its graph is blank | Counter definitions or help text are out of step | Compare it with another counter in the same group |
| Application log shows Perflib or performance errors | A provider failed to load its data, commonly reported under Event IDs such as 1008, 2003 or 2004 | Note the source, Event ID and time for each error |
| Only one app's counters fail | That app's counter files need its own repair or reinstall | Check whether the same counters fail in other tools |
Event IDs are a clue, not proof. They are commonly reported with this problem, but we did not confirm the mapping on a Microsoft page, so read the full message before you act. If the message names a service that will not start, see our guide to service missing error 1060 on Windows.
Before you change anything
Back up first
Create a restore point, keep your personal files backed up, and read our guide on backing up the registry before any change first. If you are unsure how restore points behave, read how to use System Restore before you start. If this PC is managed by an organisation, ask the administrator before you change anything. If the device uses BitLocker, keep the recovery key somewhere safe before you restart or restore anything.
Export the Perflib key as a backup file. This is a copy only, so it does not change any value. Run the command in an elevated Command Prompt, using Run as administrator.
reg export "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib" "%USERPROFILE%\Desktop\perflib-backup.reg"
You should see: the message The operation completed successfully, and a file named perflib-backup.reg on your Desktop. If this fails: stop. Do not continue to the repair step until you have a backup file, or until the restore point has been created.
Look-only diagnosis first
Diagnosis comes first because it shows which counters are affected. None of the steps in this part changes anything. Close the tools when you are done, and do not remove counters from any list.
Open Performance Monitor and note the failures
Press the Windows key, type perfmon, and press Enter. Performance Monitor opens.
You should see: the Performance Monitor window with its tree of monitoring tools on the left.
If this fails: the window does not open at all. Read the guide on a Windows tool that will not open for related checks, and ask an administrator if the device is managed.
Open the counter list for the monitoring view, and read which categories show errors, empty entries or a message. Press Cancel to close the list without adding anything.
You should see: a short list of categories, some of which may be empty or missing.
If this fails: the list does not load. Note the message text exactly and continue to the Application log check.
For general use of Performance Monitor, including how to read a graph, see our guide to Performance Monitor and a slow PC. This section only covers whether the counters themselves are broken.
Read the Application log
Press the Windows key, type eventvwr.msc, and press Enter. Event Viewer opens.
You should see: the Event Viewer window with Windows Logs in the left pane.
If this fails: the tool does not open. Note the error and move on; you can still use the Performance Monitor results.
Open Windows Logs, then Application. Filter the log by the source or Event ID you saw in the first check, and look at the errors near the time a counter failed. Read only. Do not clear the log.
You should see: error entries with a source, an Event ID, a time and a message.
If this fails: the log is empty for that period. That is useful too: the problem may be from a counter that is not written to the log.
A note on lodctr /Q
Some guides suggest lodctr with a /Q parameter to list installed counters. The Microsoft lodctr page we opened does not document a /Q parameter, so this guide does not rely on it. Use the Performance Monitor and Event Viewer checks above instead. To read the Perflib values without changing them, use our guide to reading the registry with reg query.
Where the problem sits: a route
Follow the route in order. Each stop narrows the cause, and each one is a read-only check.
- Tool check Does Performance Monitor open, and which categories fail? If none fail, the problem is probably in one tool, not in the counters.
- Log check Do the Application log errors name a provider or an Event ID that matches a failing counter?
- Scope check Do all counters fail, or only one app's? One app suggests the repair belongs to that app.
- Repair step If the counters fail across the system, back up and rebuild them with lodctr /R as described below.
- Retest Restart, open Performance Monitor again and read the results.
Use this short path when you are not sure where to start:
- Do all the failing counters belong to one app?
- Yes: repair or reinstall that app first, then retest.
- No: continue to the next question.
- Does the Application log show provider or Perflib errors?
- Yes: back up, then rebuild with lodctr /R.
- No: check the log for the time of the failure, then repeat the look-only checks.
Rebuild the counters with lodctr /R
Microsoft's lodctr page describes the /R parameter as restoring counter registry settings and explanatory text from current registry settings and cached performance files. The same page describes a form with a filename, /r:filename, which overwrites all counter settings from that file. This guide does not use the filename form, because it needs a file you have checked and it replaces every setting.
Run the rebuild, step by step
Work through the steps in order. Do not skip the backup.
Sign in with an administrator account. Close Performance Monitor, Event Viewer and any other tool that reads counters.
You should see: no monitoring windows open on the screen.
If this fails: you do not have administrator rights on this PC. Ask the administrator to run the steps, and do not continue on a standard account.
Open an elevated Command Prompt. Press the Windows key, type cmd, right-click Command Prompt, and choose Run as administrator.
You should see: a Command Prompt window whose title bar includes the word Administrator.
If this fails: the Run as administrator option is missing or refused. Stop here; the rest of this route needs administrator rights.
Type the command below and press Enter. Do not close the window while it runs.
lodctr /RYou should see: the command finishes and the prompt returns. Microsoft's page notes that an exit code of 0 only means the command line syntax was correct, not that the operation succeeded, so read any text it printed.
If this fails: the output shows an error or a message about the registry. Write the exact text down, stop, and go to the section on what to do if lodctr does not help.
Restart and retest the counters
Restart the PC, then sign in again. Restarting lets the tools read the rebuilt settings. If Windows keeps asking for a restart after that, see our guide on a pending restart that never clears.
You should see: the sign-in screen and then your desktop, with no new startup errors.
If this fails: the PC does not start normally. Use the Recovery options from the sign-in screen, and read the restore guide before you try anything else.
Retest. Open Performance Monitor, open the counter list again, and read the categories. Then open Event Viewer and look at Application errors from the time after the restart.
You should see: the counters that failed now show data, or at least no longer show the same error.
If this fails: the same counters still fail. Go to the section on the checks that follow lodctr, and do not run the repair in a loop.
Counters from third-party apps
Some counters come from an app rather than from Windows itself. If only that app's counters fail after the rebuild, the fix often sits with the app. Use the app's own repair option, or reinstall it from the vendor, and then retest. Do not copy registry values between apps or into the Perflib area by hand.
If lodctr /R does not help
If the counters still fail, check the system files next. These steps are general guidance. Run them in an elevated Command Prompt and create or confirm your restore point first.
Check the system image with DISM
Microsoft Learn's "Repair a Windows Image" page documents /RestoreHealth, which is the command below. Many guides suggest it to check and repair the Windows image. It can take a long time and may need an internet connection. Read our guide on DISM error 0x800f081f and source files if the command reports a source problem.
DISM /Online /Cleanup-Image /RestoreHealth
You should see: the operation completes with a success message, or a report that the image is repaired. If this fails: note the error code and stop. Do not run further repairs until you have checked the error in the linked guide.
Check protected files with SFC
Microsoft's sfc page we opened describes the command as scanning and verifying the integrity of protected system files, and replacing incorrect versions with correct ones. Run it after DISM has finished, then restart.
sfc /scannow
You should see: a verification result, such as no integrity violations, or a message that some files were repaired. If this fails: the scan reports files it cannot repair. Read our guide on SFC that found corrupt files it could not fix, and do not delete or replace system files by hand.
System Restore as a last option
If the problem started after a recent change, a restore to the point you created earlier may help. We do not claim how System Restore treats every value in every case, so read our guide on what System Restore does to the registry before you rely on it. Use the steps in how to use System Restore, and keep your files backed up.
What not to do
- Do not use a registry cleaner. Microsoft's pages do not support cleaners as a repair for counters, and they can remove entries you need. Our guide to what registry cleaner results mean explains why.
- Do not edit Perflib values by hand, do not delete keys, and do not apply tweaks that switch performance counters off.
- Do not download single DLL files or run unknown scripts to fix a counter.
- Do not turn off Windows Security or other protection to test a cause.
- Do not run lodctr /R again and again. Run it once, restart, retest, and move to the next check.
When to stop and get help
Stop when lodctr prints an error, when the output names a damaged database, or when the counters come from an app you do not control. Stop also when the device is managed by an organisation, and ask the administrator before any further change. Bring the Event ID, the counter names, the exact error text and the time of the failure to whoever can help.
If the counters work but a Windows management service is using a lot of processor time, the problem may be a different one. Our guide on the WMI Provider Host using high CPU covers that case separately. If the errors point to the WMI database itself, see WMI repository inconsistent verify and repair. If a startup program may be interfering, a clean boot guide for finding a software conflict explains how to narrow it down.
If you have worked through the checks and want a guided path, the Repair Assistant can help narrow the cause without changing anything on the PC.
Frequently asked questions
Basics of the repair
What does lodctr /R do?
Microsoft's lodctr page describes /R as restoring counter registry settings and explanatory text from current registry settings and cached performance files. It does not repair the app that provides a counter, so third-party counters may still need their own repair.
Is it safe to run lodctr /R?
We think it is a reasonable step after a backup, which is why this guide begins with one. We avoid the filename form, /r:filename, because Microsoft's page warns that it overwrites all counter settings.
Do I need to restart after lodctr /R?
We suggest a restart so the tools read the rebuilt settings. This is general guidance, not from Microsoft's lodctr page.
Why do counters still fail if lodctr exited with code 0?
Microsoft's page says an exit code of 0 means the command line syntax was correct, not that the operation succeeded. Read the printed output and retest the counters before you assume the repair worked.
Follow-up checks
Should I run lodctr /R more than once?
Some guides suggest running it again. Microsoft's lodctr page does not say so, so this guide suggests one run, a restart and a retest. If the counters still fail, move to the next check instead of repeating the command.
Are Event IDs 1008 and 2003 always counter problems?
They are commonly reported together with performance counter problems, but the number alone does not prove the cause. Read the source and the message text in Event Viewer before you act on it.
Will DISM and SFC fix performance counters?
They can repair damaged system files, which sometimes helps when the counters are still broken after lodctr. Run them only after your backup is in place, then restart and retest.
When should I stop and ask for help?
Stop when the output names a damaged database, when the counters belong to an app you do not control, or when the device is managed by an organisation. Bring the error text and the time of the failure to the person who can help.
How this guide was checked
We compared the steps with the Microsoft pages we opened for lodctr, the overview of performance counters and sfc. Microsoft Learn's "Repair a Windows Image" page documents /RestoreHealth, so the DISM step is checked against that page. Where a claim could not be confirmed, such as the Perflib subkey path, the Event ID meanings and the second-run advice, the text says so. None of the steps was run on a real PC, and this guide makes no claim of lab testing.