473,386 Members | 1,773 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.

Perf Counters in Web App

Ben
Hi,

I registered some custom perf counters that i want to use in my app
(all of type NumberOfItems32). I added them under the same category
name but different counter names...

Same code work perfect in a test c# app, but when i put it on a web
app, there's a strange issue -- In perfmon, i only see one counter
being affected (rest are 0)... and in my code I made a test page to
just show the RawValue for each counter -- that page shows each
PerformanceCounter object has the same value (it should not... i also
have internal counter variables i use for a sanity check).

The PerformanceCounter objects are defined as static like so:

internal static PerformanceCounter pcCurrentRequests = new
PerformanceCounter("Amdocs SIMS HTTP Server","TotalRequests",false);
internal static PerformanceCounter pcCurrentFullscans = new
PerformanceCounter("Amdocs SIMS HTTP Server", "FullscanRequests",
false);
internal static PerformanceCounter pcCurrentFullscans2 = new
PerformanceCounter("Amdocs SIMS HTTP Server", "Fullscan2Requests",
false);
internal static PerformanceCounter pcCurrentHeartbeat = new
PerformanceCounter("Amdocs SIMS HTTP Server", "HeartbeatRequests",
false);
internal static PerformanceCounter pcCurrentGetConfig = new
PerformanceCounter("Amdocs SIMS HTTP Server", "GetConfigRequests",
false);

In the Application_Start method i set the initial RawValue to 0.... I
tried to set each object to a different value, but it just takes the
last and sets on all of them....

anyone experienced this?
Aug 4 '08 #1
1 1478
Ben
On Aug 4, 4:38*pm, Ben <benm5...@gmail.comwrote:
Hi,

I registered some custom perf counters that i want to use in my app
(all of type NumberOfItems32). *I added them under the same category
name but different counter names...

Same code work perfect in a test c# app, but when i put it on a web
app, there's a strange issue -- *In perfmon, i only see one counter
being affected (rest are 0)... and in my code I made a test page to
just show the RawValue for each counter -- that page shows each
PerformanceCounter object has the same value (it should not... i also
have internal counter variables i use for a sanity check).

The PerformanceCounter objects are defined as static like so:

internal static PerformanceCounter pcCurrentRequests = new
PerformanceCounter("Amdocs SIMS HTTP Server","TotalRequests",false);
* * internal static PerformanceCounter pcCurrentFullscans = new
PerformanceCounter("Amdocs SIMS HTTP Server", "FullscanRequests",
false);
* * internal static PerformanceCounter pcCurrentFullscans2 = new
PerformanceCounter("Amdocs SIMS HTTP Server", "Fullscan2Requests",
false);
* * internal static PerformanceCounter pcCurrentHeartbeat = new
PerformanceCounter("Amdocs SIMS HTTP Server", "HeartbeatRequests",
false);
* * internal static PerformanceCounter pcCurrentGetConfig = new
PerformanceCounter("Amdocs SIMS HTTP Server", "GetConfigRequests",
false);

In the Application_Start method i set the initial RawValue to 0.... I
tried to set each object to a different value, but it just takes the
last and sets on all of them....

anyone experienced this?
I took the same class code and popped in a test web app and it worked
(same exact category/counter names)....

eventually to fix it, i just changed the Cateogry name and it
worked!! something must of been corrupt on that server in regards to
perf counters.... perhaps a reboot would of fixed it as well.

if anyone ran into this or knows more info please drop a note...
Aug 5 '08 #2

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

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: mark | last post by:
I'm using the ACT object model/wscript to automate the running of ACT tests (application center test). For some reason when I run the test from the ACT UI, the performance counters get collected,...
15
by: Raj | last post by:
Hello all: We have a table with about 2400 cells. Our requirement is to highlight the cells in the table whose data has changed, every 5 seconds. Our script behaves relatively ok in Firefox, but...
4
by: Chad Myers | last post by:
I'm instrumenting my app with a few performance counters and I'd like to ask you all for some advice on how to handle performance counter instances. I have a class library that is a base library...
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...
11
by: Pohihihi | last post by:
I was wondering what is the ill effect of using try catch in the code, both nested and simple big one. e.g. try { \\ whole app code goes here } catch (Exception ee) {}
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...
2
by: David | last post by:
We've developed a seismic-data processing app in VB.NET 1.1 which runs on XP Pro using SQL2K. Like all seismic data apps, it deals with HUGE amounts of binary data (we use NTFS sparse "flat...
2
by: Stefan Kuhr | last post by:
Hello everyone, I hope this is not an FAQ and that somebody can answer this: As part of our webservice installation we run aspnet_regiis.exe -ir -enable on computers where the web...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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,...

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.