get_memory_stats
Retrieves .NET memory metrics from a target process to diagnose memory leaks, excessive GC activity, or high memory pressure.
Instructions
Returns current .NET memory usage for a target process including total allocated bytes, GC generation collection counts (Gen0/Gen1/Gen2), Large Object Heap size, and memory pressure level. Use this when investigating memory leaks, unexpectedly high memory usage, frequent GC pauses, or slow application performance caused by garbage collection pressure. Call get_process_info first to confirm the process is reachable.
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) |