473,325 Members | 2,785 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,325 software developers and data experts.

C#: performance counters

750 Expert 512MB
i want to programmatically create performance counters.... like Control Panel-> Admin Tools->Performance->Counter Logs...

I wonder if this code is right for it?atleast for creating a new logs.. But i dont see it on "Counter Logs"

if(!PerformanceCounterCategory.Exists("Grudge 2"))
{
CounterCreationDataCollection mycounter = new CounterCreationDataCollection();

CounterCreationData test = new CounterCreationData();
test.CounterName = "Vanessa";
test.CounterHelp="HALO";
test.CounterType = PerformanceCounterType.NumberOfItems32;


mycounter.Add(test);

PerformanceCounterCategory.Create("Grudge 2","Sample",mycounter);

}

i want to configure, again programmatically to "look for " processor time and memory usage if it exceeds certain limit... and i want to generate Events logs in system and application... I guess this happens automatically ...

I want the above programitacally...
Jan 23 '08 #1
0 900

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: David Mitchell | last post by:
Hello group, I'm trying to write code to test an application we're developing. This application needs to store its own performance data in the registry, and we'd like to be storing quite a...
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...
2
by: Mark | last post by:
Hi... We're looking at moving an ASP app from IIS 5 to IIS 6. In general things seem to be working okay, but there are some oddities around the edges. One of those unanticipated changes has to...
2
by: Marc Melancon | last post by:
Will the next release of SQL Server 2000 64bit sp provide performance counter? MarcM
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...
1
by: Robert Strickland | last post by:
I have a .Net web service (written for 1.1 Framework using C#) running on Windows 2003 with all latest patches. To help monitor the service, the code creates several performance counters. One...
10
by: Zytan | last post by:
I made a program using the Timer class, and I start the timer with Timer.Start(), but don't stop it with Timer.Stop(), and I assumed this was ok, but, Process Explorer informs me, after running it...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.