I have a .net core service running on windows. In the performance monitor tool I could find counters such as "\Process(MyServiceName)\% Processor Time"
but not others like
"\.NET CLR LocksAndThreads(MyServiceName)\*"
how to find which .net core counters are supported by the perfmon?
I need to get the "\.NET CLR LocksAndThreads(MyServiceName)\*"
for my service, any idea how to do it?
Diagnose and solve performance problems in net-core
EventCounters
You can use these performance diagnostic tools designed for .NET Core :
dotnet-trace
dotnet-counters
Example Usage of dotnet-counters:
Install the tool
dotnet tool install --global dotnet-counters
Run command below to make dotnet-counters create a diagnostics socket named
myport.sock
and wait for a connection.dotnet-counters collect --diagnostic-port myport.sock
Set
DOTNET_DiagnosticPorts=myport.sock
in your application's environment variables which will enabledotnet-counters
to start collecting counters on your app and run your app.Output of the command in 2:
By default
dotnet-counters
will collect/monitor the Well-known EventCounters, The counters I believe you are specifically interested in are the System.Runtime counters i.eMonitor Lock Contention Count
,ThreadPool Queue Length
andThreadPool Thread Count
(These are monitored/collected by default).