473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Performance Counters

I am using the PerformanceCounter and
PerformanceCounterCategory classes to build my own version
of perfmon.

The problem is that my computer has categories
called "Indexing Service" and "Indexing Service Filter" (I
assume that they were put there when I installed MSDE or
MS Access). The thing is that perfmon shows that they
have no instances ("<no instances>" appears in the
Instances listbox) but still manages to show that there
are a couple of counters available.

When I use either the GetInstanceNames or GetCounters
methods from the PerformanceCounterCategory object, using
either of the above categories, I get -

"System.InvalidOperationException: The Indexing Service
category doesn't provide any instance information, no
accurate data can be returned."

Now, I can use a try/catch block for the GetInstanceNames
method, but I would still like to see the counters so what
do I with the GetCounters method to make it work?

Thanks in advance,
Martin

Jul 21 '05 #1
1 1801
"Martin Payne" <mc*****@qualtech-int.com.au> wrote in message news:<12****************************@phx.gbl>...
I am using the PerformanceCounter and
PerformanceCounterCategory classes to build my own version
of perfmon.

The problem is that my computer has categories
called "Indexing Service" and "Indexing Service Filter" (I
assume that they were put there when I installed MSDE or
MS Access). The thing is that perfmon shows that they
have no instances ("<no instances>" appears in the
Instances listbox) but still manages to show that there
are a couple of counters available.

When I use either the GetInstanceNames or GetCounters
methods from the PerformanceCounterCategory object, using
either of the above categories, I get -

"System.InvalidOperationException: The Indexing Service
category doesn't provide any instance information, no
accurate data can be returned."

Now, I can use a try/catch block for the GetInstanceNames
method, but I would still like to see the counters so what
do I with the GetCounters method to make it work?

Thanks in advance,
Martin


I am having the exact same problem as you.
My way around it is to use try/catch statements, and also, use
GetCounters with an empty string.

GetCounters ("")

That seems to work for me.
HTH

David
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: rob_c | last post by:
Hi, I've been working with the EIF for a few days now. One of the default event sinks provided is the WMI. I've played around a bit and can send events to the WMI. My question here centers on...
0
by: Christopher Attard | last post by:
Hi, I need to create a dialog like the 'Add Counters' dialog box in perfmon. I'm using the System.Diagnostics namespace class in .NET and I've managed to do it. The problem arises when I'm...
7
by: James | last post by:
Hi Has anybody had any experience of ASP.Net performance counters not updating. In the performance monitor application when I try to add the groups ASP.NET and ASP.NET Applications the...
19
by: Tom Jastrzebski | last post by:
Hello, I was just testing VB.Net on Framework.Net 2.0 performance when I run into the this problem. This trivial code attached below executed hundreds, if not thousand times faster in VB 6.0...
1
by: jvn | last post by:
I am experiencing a particular problem with performance counters. I have created a set of classes, that uses System.Diagnostics.PerformanceCounter to increment custom performance counters (using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.