Wednesday, March 14, 2007

.Net CLR Performance Counters Don't Appear in Perfmon

This took a while to figure out . . . I needed to use the .Net Memory counters to watch the heap sizes and garbage collections. Unfortunately, none of them appeared in Perfmon under Performance Objects.

I looked up the old standby on "How to Manually Rebuild Performance Counter Library Values"

I wasn't quite willing to do all of the registry pecking and ripping needed to do that rebuild but I checked out the keys mentioned and tried running LODCTR \R on the .Net CLR ini file. That reported that they were already installed. :-

So I checked in on the registry entries under Services . . . HKLM\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance

Imagine my surprise when I saw this value:

Disable Performance Counters = 1

Setting that to 0 brought the counters back as expected.

I blame big brother for this one, but it turns out that windows will make this setting if a counter fails some tests at load time.
Disable Performance Counters

Although you can set Perflib not to disable on fail:
Perflib Configuration Flags

No comments:

Post a Comment