Introduction

Windows Performance Counters provide real-time metrics for CPU, memory, disk, network, and application performance. When the counter registry becomes corrupted, Performance Monitor (perfmon.exe) shows blank graphs, N/A values, or the counters are entirely missing from the Add Counters dialog. This affects not only the GUI tool but also any monitoring system (SCOM, PRTG, Prometheus Windows exporter) that relies on performance counter data.

Symptoms

  • Performance Monitor shows blank or gray graphs with no data
  • Add Counters dialog shows empty categories or No instances
  • typeperf "\Processor(_Total)\% Processor Time" returns No valid counters
  • Monitoring agents report counter not found errors
  • lodctr /Q shows corrupted or missing counter strings

Common Causes

  • Registry keys under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib corrupted
  • Application installation or uninstallation damaged shared counter entries
  • Windows Update modified system components without updating counter registry
  • Third-party monitoring tools registering and then unregistering counters incorrectly
  • Disk errors corrupting the PERFOS.INI or PERFC.INI files

Step-by-Step Fix

  1. 1.Diagnose counter corruption:
  2. 2.```cmd
  3. 3.lodctr /Q
  4. 4.REM Check for errors in the output
  5. 5.REM Also check:
  6. 6.typeperf -qx 2>&1 | findstr /C:"Error"
  7. 7.`
  8. 8.Rebuild performance counters from scratch:
  9. 9.```cmd
  10. 10.REM Run as Administrator
  11. 11.cd C:\Windows\System32
  12. 12.lodctr /R
  13. 13.REM This rebuilds the counter registry from system files
  14. 14.`
  15. 15.Resync with WMI if WMI-based monitoring is affected:
  16. 16.```cmd
  17. 17.cd C:\Windows\System32\wbem
  18. 18.winmgmt /resyncperf
  19. 19.`
  20. 20.Rebuild specific counters if only some are broken:
  21. 21.```cmd
  22. 22.REM Rebuild ASP.NET counters
  23. 23.cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319
  24. 24.aspnet_perf.ini
  25. 25.lodctr aspnet_perf.ini

REM Rebuild .NET Framework counters lodctr C:\Windows\Microsoft.NET\Framework64\v4.0.30319\corperfmonsymbols.ini ```

  1. 1.Restart the Performance Logs and Alerts service:
  2. 2.```powershell
  3. 3.Restart-Service pla
  4. 4.# Restart any monitoring agents
  5. 5.Restart-Service Winmgmt
  6. 6.`
  7. 7.Verify counters are working:
  8. 8.```cmd
  9. 9.typeperf "\Processor(_Total)\% Processor Time" -sc 3
  10. 10.REM Should show three samples of CPU usage
  11. 11.lodctr /Q
  12. 12.REM Should show all counters properly registered
  13. 13.`

Prevention

  • Include performance counter health checks in server validation scripts
  • Test monitoring tools after major Windows Updates or application installations
  • Back up the Perflib registry key before installing software that registers counters
  • Use lodctr /S:backup.ini to export counter configuration before changes
  • Monitor for counter failures in your monitoring system's own health status