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.
One of the problems I encountered when using this tool is getting errors due to Non Valid Counters. Below is the exact error message:
To fix the error, we must rebuild the Performance counters using LODCTR, take note this fixes also performance counter issues when using Perfmon.
- Launch Command Prompt as Administrator (right click Runs As Administrator).
- Go to C:\WINDOWS\System32
CD C:\WINDOWS\System32 - 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
- Launch Command Prompt as Administrator (right click Runs As Administrator).
- Go to C:\WINDOWS\SysWOW64
CD C:\WINDOWS\SysWOW64 - 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.
Hello,
I’ve followed your solution, but i still can’t do a typeperf command…
“Error: no valid counters.”
LikeLike