Coding 'n stuff
Monthly Archives: February 2009
I’ve noticed on x64 versions of Windows that performance counter information gets corrupted for apparent reason. I have seen it happen on a clean machine, right after installing custom performance counters using installutil and a custom .NET performance counter installer class.
The symptoms are that if you start up perfmon you might get an error saying “MMC failed to initialize the snap-in”, or you might find that certain perf counters are missing (like ones in the Processor category). In the past, I have resolved problems like this by running lodctr /R from the command line. This instructs Windows to rebuild the performance counters using the backup perf database that it maintains.
I had a case today where this approach didn’t work. I went digging through the registry, and started searching for “Disable Performance Counters” in HKLM\SYSTEM\CurrentControlSet\Services using the Find dialog. I found there were several entries with a hex value 4 or 1 listed. I changed all the occurrences of that key to 0, and it fixed the problem!