No performance counter data and Invalid operation exception

Code and memory profiling for .NET developers.

Moderators: Brian Donahue, richardjm, StephenC

No performance counter data and Invalid operation exception

Postby jberry » Mon Feb 09, 2009 8:48 pm

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 )
jberry
 
Posts: 3
Joined: Mon Feb 09, 2009 8:41 pm

Postby Brian Donahue » Thu Feb 12, 2009 11:30 am

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?
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby jberry » Thu Feb 12, 2009 10:24 pm

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.
jberry
 
Posts: 3
Joined: Mon Feb 09, 2009 8:41 pm

Postby Brian Donahue » Fri Feb 13, 2009 10:46 am

Could be permissions... is your logon denied the "Profile System Performance" or "Profile Single Process" right in the local security policy?
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby jberry » Mon Feb 16, 2009 3:47 pm

I'm an Administrator on this machine and that is what these policies are set for.
jberry
 
Posts: 3
Joined: Mon Feb 09, 2009 8:41 pm

Postby Brian Donahue » Mon Feb 16, 2009 3:56 pm

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.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Mon Mar 02, 2009 6:36 pm

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.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to ANTS Profiler Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests