Typeperf “No Valid Counter”

Typeperf is a built-in tool that writes performance data to the command window or to a log file. Very useful when monitoring system performance. Typing “typeperf /?” in the windows command line will provide you the parameters to use the tool.

typeperf

One of the problems I encountered when using this tool is getting errors due to Non Valid Counters. Below is the exact error message:

typeperf_error

To fix the error, we must rebuild the Performance counters using LODCTR, take note this fixes also performance counter issues when using Perfmon.

  1. Launch Command Prompt as Administrator (right click Runs As Administrator).
  2. Go to C:\WINDOWS\System32
    CD  C:\WINDOWS\System32 
  3. To rebuild your resource counters type the following command:
    lodctr /r 
    Wait for a few moments for the counters to rebuild.
    That’s it!

Update: For “Error: Unable to rebuild performance counter setting from system backup store, error code is 2”. Do this steps

  1. Launch Command Prompt as Administrator (right click Runs As Administrator).
  2. Go to C:\WINDOWS\SysWOW64
    CD  C:\WINDOWS\SysWOW64
  3. To rebuild your resource counters type the following command:
    lodctr /r 

To successfully rebuilt the performance counter setting from system backup store run the command below

C:\Windows\SysWOW64>winmgmt.exe /RESYNCPERF

Run your batch files and perfmon to verify if the performance counters are fixed.

Advertisement

One Reply to “Typeperf “No Valid Counter””

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: