Reputation: 1013
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?
Upvotes: 1
Views: 931
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