Real-time monitoring tool for .NET Core process metrics (CPU, Memory). Monitor any .NET process by PID and get JSON output with CPU usage, memory consumption, and performance metrics.
$ dotnet add package DotNetMetrics.ToolReal-time monitoring tool for .NET Core process metrics. Monitor any .NET process by PID and get JSON output with CPU usage, memory consumption, and performance metrics.
Install as a global .NET tool:
dotnet tool install --global DotNetMetrics.Tool
dotnet-metrics <PID>
dotnet-metrics <PID> --out metrics.json
dotnet-metrics <PID> -o /path/to/metrics.json
Windows (PowerShell):
Get-Process | Where-Object {$_.ProcessName -like '*your-app*'}
Linux/macOS:
ps aux | grep your-app
tasklist | findstr "process_name"
{
"timestamp": "2025-08-25T10:30:45.123Z",
"processId": 1234,
"processName": "MyApp",
"cpuUsagePercent": 15.67,
"memoryUsageMB": 256.78,
"workingSetMB": 312.45,
"privateMemoryMB": 189.23
}
| Parameter | Short | Description |
|---|---|---|
<PID> | - | Process ID to monitor (required) |
--out | -o | Output file path (optional) |
cd DotNetMetrics.Console
dotnet run <PID>
monitor_process.bat <PID>
.\monitor_process.ps1 -ProcessId <PID>
dotnet run 1234
# or
monitor_process.bat 1234
# or
.\monitor_process.ps1 -ProcessId 1234
Where 1234 is the PID of the .NET Core process you want to monitor.
Press Ctrl+C to stop monitoring.
Pre-built self-contained executables are available for all major platforms:
| Platform | Executable | Size |
|---|---|---|
| Windows x64 | builds/win-x64/DotNetMetrics.Console.exe | ~12 MB |
| Windows x86 | builds/win-x86/DotNetMetrics.Console.exe | ~11 MB |
| Windows ARM64 | builds/win-arm64/DotNetMetrics.Console.exe | ~12 MB |
| Linux x64 | builds/linux-x64/DotNetMetrics.Console | ~13 MB |
| Linux ARM64 | builds/linux-arm64/DotNetMetrics.Console | ~13 MB |
| macOS x64 | builds/osx-x64/DotNetMetrics.Console | ~13 MB |
| macOS ARM64 | builds/osx-arm64/DotNetMetrics.Console | ~13 MB |
.\build-windows.ps1
.\build-all-platforms.ps1
.\list-builds.ps1
See BUILD.md for detailed build instructions.
git clone https://github.com/jakubkozera/dotnet-metrics.git
cd dotnet-metrics
dotnet pack DotNetMetrics.Console --configuration Release
dotnet tool install --global --add-source ./nupkg DotNetMetrics.Tool
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Jakub Kozera
⭐ If this tool helps you, please consider giving it a star!