This is a bit off topic, but since I’ve already mentioned the Performance Monitor (perfmon) I’d thought I’ll address a behavior that some find intriguing.

When collecting performance information one must define a new counter log that will collect data from all relevant counters. When adding .NET counters to this log and openning the log file after running it for some time, sometimes you will see that it does not log .NET counters data and you will see them as if there is no data available on them.

This happens due to the credentials of the user running the performance monitor service.

So, how do we resolve it?

The solution is simple but is different between Windows 2000 and Windows XP/2003.

In Windows 2000, the only way of doing so is to change the user running the “Performance Logs and Alerts” service from the Services console.

In Windows XP and Windows 2003 a bit more thought was given to this issue and you can set the specific user that will run this counter log (its per counter log!).

To do so, just add the user at the “Run as” section and it will also question you for the password (as you can see by the screen shot below).

Hope this helps, Enjoy!