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-countersRun command below to make dotnet-counters create a diagnostics socket named
myport.sockand wait for a connection.dotnet-counters collect --diagnostic-port myport.sockSet
DOTNET_DiagnosticPorts=myport.sockin your application's environment variables which will enabledotnet-countersto start collecting counters on your app and run your app.Output of the command in 2:
By default
dotnet-counterswill 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 LengthandThreadPool Thread Count(These are monitored/collected by default).