Missing .NET Performance Counters: how to solve it
Posted by Guardian in Freetime talking Tips on Wednesday 07 October 2009 at 7:55 PM
Today I’ve started to profile my applications to try to see if I have some memory leaks and performances bottlenecks.
I just started the inspection trying to look at some performance counters (especially to check if the memory allocated by my application kept growing)... but I had the surprise of the day when I couldn0t find any .Net related performance counter on my system.
At first I tried everything I knew to unload and reload performance counters, with the usual commands:
unlodctr .NETFramework
lodctr c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\corperfmonsymbols.ini
But they didn’t worked...
Then I started to look around some registry keys and I found this one:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\.NETFramework
that seemed to contains information related to the performance counters...I googled a bit and found this Microsoft knowledge base articles that clarified the thing: http://support.microsoft.com/?scid=kb%3Ben-us%3B312113&x=18&y=14
It seems that an application messed up with my registry trying to speedup its load times and in doing so it disabled the performance counters modifying the key ‘Library’ under ‘HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance’ to the non valid value ‘donotload_mscoree.dll’; Reverting this back to mscoree.dll and reloading the Perfmon utility I had my counters back.
It costed me only 1 hour and a half of my time!

Recent Comments