473,815 Members | 3,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Performance counter

I've added the performance counter object to my app... Within the class
there's the PerformanceCoun ter.CategoryNam e property that allows you to set
what category you want to monitor. For instance, CategoryName =
"Processor" . At design time, you get a drop down list of available
categories. Does anyone know how to get the list of available categories
at runtime?

http://msdn.microsoft.com/library/de...l=/library/en-
us/cpref/html/frlrfsystemdiag nosticsperforma ncecounterclass categorynametop i
c.asp

Thanks for any help...

-C

Nov 20 '05 #1
1 2572
Hi C,

Try PerformanceCate gory.GetCategor ies (in System.Diagnost ics). Each
category has a CategoryName property.

Craig VB .Net Team
--------------------------------------------------------------------
This reply is provided AS IS, without warranty (express or implied).

--------------------
Newsgroups: microsoft.publi c.dotnet.langua ges.vb
Subject: Performance counter
From: socal <so*********@ya hoo.com>
Organization : Your Company
Message-ID: <Xn************ *************** ******@140.99.9 9.130>
User-Agent: Xnews/5.04.25
Lines: 17
X-Complaints-To: ab***@easynews. com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.Date: Mon, 17 May 2004 21:41:49 GMT
Path: cpmsftngxa10.ph x.gbl!TK2MSFTNG XA05.phx.gbl!TK 2MSFTNGP08.phx. gbl!newsfeed00. s
ul.t-online.de!t-online.de!npeer .de.kpn-eurorings.net!n ewsfeed.news2me .com!n
ewsfeed3.easyne ws.com!easynews .com!easynews!e asynews-local!news.easy news.com
..POSTED!not-for-mailXref: cpmsftngxa10.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:203439
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb

I've added the performance counter object to my app... Within the class
there's the PerformanceCoun ter.CategoryNam e property that allows you to setwhat category you want to monitor. For instance, CategoryName =
"Processor" . At design time, you get a drop down list of available
categories. Does anyone know how to get the list of available categories
at runtime?

http://msdn.microsoft.com/library/de...l=/library/en-
us/cpref/html/frlrfsystemdiag nosticsperforma ncecounterclass categorynametop i
c.asp

Thanks for any help...

-C


Nov 20 '05 #2

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

Similar topics

0
1565
by: william | last post by:
Hi, I'm playing windows service using vb.net. I added a performance counter to my windows service, but I couldn't set MachineName property of the performance counter to blank. After I set it to empty, whenever the focus leave it, pop up error message. In Chapter 2 lesson 3 of Developing XML Web Services and Server Components with Microsoft Visual Basic.NET and Microsoft VIsual C#.net book, there is a note saying "By default the designer also...
0
440
by: Val Mazur (MVP) | last post by:
Hi guys, My application creates custom performance counter and it works fine. Now I am creating multiple instances of the same counter and increment value for each instance. This part work fine as well. But if I open Performance Monitor it does not show any instances of the counter and, of course, no information available for the counter. Am I missing something? Val
2
2093
by: Marc Melancon | last post by:
Will the next release of SQL Server 2000 64bit sp provide performance counter? MarcM
0
1537
by: jimiz | last post by:
I have a question on how the performance counter instance returns values. I have an app that uses the performance counter for Category name = "Web Service" Counter name = "Current Connections" Instance name = "_Total" That works great / however when I use the following counter it returns some incorrect data. Category Name = "Web Service"
0
1300
by: Salvador | last post by:
Hi, I have created a service, which installer installs 5 performance counters as well. Then the service instances these counters and interact with them. If I check the event viewer I receive an error everytime the service starts: "The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly". All my 5 counters are custom and actually all of them work fine showing the
1
2459
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 .Net 2.0) The performance counter categories have been successfully created. When the set of classes are used by a WinForm test harness application, they function as expected, and the performance counters can be seen to be updated by using the...
1
15519
by: JSha | last post by:
Hello, The application I am using works on most machines except one where in it throws the following exception... Error: Process Performance Counter is Disabled, so requested operation cannot be performed. Stack Trace: at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib library)
0
1638
by: JSha | last post by:
Hello, The application I am using works on most machines except one where in it throws the following exception... Error: Process Performance Counter is Disabled, so requested operation cannot be performed. Stack Trace: at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib library)
0
1943
by: George2 | last post by:
Hello everyone, I found using performance counter API and using perfmon counter will result in different numeric result. Here is an example, and in the example code, virtual bytes is always larger than working set, but in perfmon, working set is always larger than working set. Any ideas?
6
3140
by: sony.m.2007 | last post by:
Hi, I'm using VSTS2008. I tried to create a performance counter as below. A simple example of monitoring processor usage (similar to what's seen in task manager): Code Snippet
0
9735
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9610
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10670
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10426
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9225
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6897
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5708
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3030
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.