marcob
marcob

Reputation: 1013

Get .NET CLR performance counters for a windows service?

How can one get .NET CLR* performance counters for a windows service?

Using Performance Monitor there is no instance related to my service but Process Explorer is able to show me specific counters for my service.

I see the instance if I ran the service as a console application. Am I missing any configuration? If so how does Process Explorer work anyway?

enter image description here

Upvotes: 1

Views: 931

Answers (1)

Felice Pollano
Felice Pollano

Reputation: 33272

Checkout the System.Diagnostics namespace, start with the PerformanceCounter class You can create some performance counter specific for your service and then they show in the performance monitor.

Upvotes: 0

Related Questions