Questions tagged [performancecounter]

PerformanceCounters are indicators for how much work a program does.

As a starting-point for windows:

1014 questions
28
votes
2 answers

Performance Counter by Process ID instead of name?

I am tracking multiple instances of the same application and need to get the memory and cpu use of both processes. However, I cant seem to figure out a way to use the performance counter and know which result is for which process. I have seen that I…
JeremyK
  • 2,077
  • 1
  • 19
  • 37
28
votes
3 answers

What are the best ASP.NET performance counters to monitor?

There are truckloads of counters available in perfmon for ASP.NET. What are the best (I am thinking of choosing 5-10) that will be the best to monitor in our test environment so that we can feed back to developers. I am thinking of things like…
Simon Munro
  • 5,353
  • 6
  • 29
  • 38
27
votes
1 answer

Is there anyway to read performance counters on OS X Mountain Lion?

Shark, Apple's profiler which let you configure custom performance counters, is no longer supported in OSX Mountain Lion since it can't run a 32-bit kernel. Instruments.app, Apple's replacement for Shark, doesn't seem to support reading performance…
user1775117
  • 333
  • 1
  • 4
  • 7
24
votes
2 answers

How can I add a performance counter to a category i have already created

I have created a PerformanceCounterCategory like below var category = PerformanceCounterCategory.Create("MyCat", "Cat Help", PerformanceCounterCategoryType.SingleInstance, "MyCounter", "Counter Help); How can I add a new counter to the category…
Kev Hunter
  • 2,365
  • 4
  • 22
  • 37
24
votes
3 answers

Retrieve process network usage

How can I get a process send/receive bytes? the preferred way is doing it with C#. I've searched this a lot and I didn't find any simple solution for this. Some solutions suggested to install the WinPCap on the machine and to work with this…
Tomer Peled
  • 3,472
  • 4
  • 30
  • 51
24
votes
3 answers

How to use AverageTimer32 and AverageBase performance counters with System.Diagnostics.Stopwatch?

When I execute the following program and look at the performance counter the results don't make sense to me. The average value is zero and the min/max values are ~0.4 when I would expect ~0.1 or ~100. What is my problem? Code class Program { …
Eric Schoonover
  • 44,080
  • 43
  • 148
  • 200
24
votes
4 answers

Deleting Windows performance counter categories

I have a custom performance counter category. Visual Studio Server Explorer refuses to delete it, claiming it is 'not registered or a system category'. Short of doing it programmatically, how can I delete the category? Is there a registry key I can…
Matt Howells
  • 37,626
  • 19
  • 78
  • 101
22
votes
2 answers

Performance counter vs ETW

Are performance counters part of ETW? If not, what is the difference between the two?
imak
  • 6,109
  • 7
  • 43
  • 71
21
votes
4 answers

Performance Counter Category Names? (C#)

I'm trying to program in a performance counter into my C# application that launches another process and checks the processor usage of that launched process. As I understand it, the performance counter class requires me to assign a category name , a…
Waffles
  • 289
  • 2
  • 3
  • 7
21
votes
2 answers

Perfmon counters to check memory leak

I want to check the memory leakage issue in my service. I have tried following set of perfmon counters. .NET CLR Memory\# Bytes in all Heaps .NET CLR Memory\Gen 2 Heap Size .NET CLR Memory\# GC handles .NET CLR Memory\# of Pinned Objects …
19
votes
1 answer

How do performance counter average timers get associated with their base?

I am adding some performance counters to my c# project and am creating a new PerformanceCounterCategory. In this category, I would like to have multiple counters/timers that track different things. I have a need to use multiple average timers and am…
Alex
  • 193
  • 1
  • 6
18
votes
1 answer

Creating & Editing performance counters in a powershell script or command line

I'm trying to move the verification & creation of my performance counter groups, and the counters themselves, out of my web service and into a powershell script that's run during deployment. Can this be done? Or am I stuck using a simple app to…
b34r
  • 579
  • 1
  • 10
  • 22
18
votes
1 answer

List all processes and their current memory & CPU consumption?

How can I get a list of all processes in C# and then for each process current memory and CPU consumption? Sample code is highly appreciated.
Alex
  • 71,233
  • 79
  • 245
  • 337
18
votes
3 answers

Concept of "Performance Counters" in Linux/Unix

Windows has a Performance Counters infrastructure. The OS provides some common counters, and I can go add my own. What is the corresponding concept in Linux/Unix?
user15071
  • 3,141
  • 8
  • 28
  • 30
16
votes
3 answers

Simplest Possible Performance Counter Example

What is the smallest amount of C# code to get a performance counter up and running? I simply want to measure the number of CPU cycles and/or time between two points in my code. I've skimmed through all the waffle on the web but it seems like WAY…
Paul Matthews
  • 2,016
  • 5
  • 20
  • 28
1
2
3
67 68