get_thread_stats
Analyze .NET ThreadPool statistics to diagnose thread starvation causing slow response times and deadlocks by examining worker threads, queue length, and available threads.
Instructions
Returns .NET ThreadPool statistics for a target process including worker thread count, available threads, queue length, and completed work items. Use this when investigating slow response times, request timeouts, or deadlocks — high queue length and low available threads indicates thread starvation, which is a common cause of latency spikes in .NET APIs. Call get_memory_stats first — GC pressure is a frequent cause of thread starvation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | The process ID (PID) of the target .NET application | |
| sampleSeconds | No | How long to sample counters in seconds (default: 2) |