Options

No performance counter data and Invalid operation exception

I'm evaluating the Performance Profiler using the Mandelbrot sample.

I don't see any performance counter data and the following error is repeatedly in the log file:

09 Feb 2009 14:17:27.522 [1] INFO RedGate.Profiler.Logging.LogService - Starting new ANTS Performance Profiler 4 session
09 Feb 2009 14:17:27.538 [1] INFO RedGate.Profiler.Logging.LogService - Assembly version: 4.1.0.45
09 Feb 2009 14:17:54.006 [23] WARN RedGate.Profiler.Monitoring.PerformanceDataAdapter - Invalid operation exception occurred whilst trying to check process ID: Instance 'Mandelbrot' does not exist in the specified Category.
System.InvalidOperationException: Instance 'Mandelbrot' does not exist in the specified Category.
at System.Diagnostics.CounterDefinitionSample.GetInstanceValue(String instanceName)
at System.Diagnostics.PerformanceCounter.NextSample()
at RedGate.Profiler.Monitoring.PerformanceDataAdapter.a(Object , UpdateTimerElapsedEventArgs )

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    I'm sorry I don't know what the problem could be. I'd guess that one or more performance counters are not available, but only for the instance pertaining to the application you're profiling. If Mandelbrot is running correctly at the time these errors are thrown, it may be a problem with one of the performance counters.

    What selection of counters are you using, and if you start removing them one-at-a-time, at which point does it start working?
  • Options
    I have run it with just the default counters and with only % Processor Time. These do not show up.

    I should have mentioned that when I first ran the product I used one of my applications and had many more counters turned on. They all seemed to be working, but the timeline was very hard to read due to the different scaling for each counter.

    I went back an enabled more counters and some seem to be working - but % Processor time does not. If I use Windows perfmon program % Processor Time does work.
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Could be permissions... is your logon denied the "Profile System Performance" or "Profile Single Process" right in the local security policy?
  • Options
    I'm an Administrator on this machine and that is what these policies are set for.
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Maybe the steps in our knowledge base will help, although I would expect that if the performance counter was not properly registered, you couldn't use it inside perfmon either.
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Here is another interesting article from Microsoft about troubleshooting performance counters in .NET:
    http://support.microsoft.com/kb/922775
    The "ACCESS_DENIED" part looks like it may be interesting.
Sign In or Register to comment.