Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计通过

dotnet-dump-perf-analyzerdotnet dump 性能分析器

Agent Skill

dotnet-dump-perf-analyzer 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

857

周安装

35

GitHub Stars

公开资料未说明

下载量

274
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dotnet-dump-perf-analyzer(dotnet dump 性能分析器)
来源仓库:https://github.com/hexy693/dotnet-dump-perf-analyzer
安装命令:
openclaw skills install dotnet-dump-perf-analyzer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install dotnet-dump-perf-analyzer

简介

用于端到端 .NET 应用程序性能诊断分析。

  • 整合 dotnet-dump、counters、trace 与 WinDbg 工具链。
  • 支持故障转储解析与内存泄漏等复杂问题排查。
  • 安装前需确保已安装所需诊断工具与符号文件路径正确。
  • 建议在非生产环境先行验证操作步骤安全性。dotnet-dump-perf-analyzer 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
dotnet-dump-perf-analyzer
version
1.0.1
description
>
tags

dotnet-dump-perf-analyzer

Core focus: .NET application performance diagnosis — CPU profiling, GC analysis, managed memory leak hunting, and thread pool diagnostics. Windows perfmon / relog / HTML reporting are optional supplements covered at the end.

Use Cases

  • ASP.NET Core / ASP.NET on IIS / WPF / Console apps with sustained high CPU, frequent GC, or slow response
  • .NET apps with memory leaks or continuously growing working set
  • Want to find which method or request path is causing the bottleneck
  • Need to compare metrics against industry benchmarks (PAL thresholds) and produce a visual report
  • Team lacks dotMemory / ANTS Performance Profiler license — need a free open-source alternative

Toolchain Overview

StageToolPurpose
Rapid triagedotnet-countersLive CPU, GC, thread pool metrics — no restart needed
Deep samplingdotnet-traceCPU sampling trace collection (Windows, Linux, macOS)
Dump capturedotnet-dumpFull-process core dump of a running app (all platforms)
Heap snapshotdotnet-gcdumpGC heap-only dump, smaller than full dump
System metricsperfmon + relog.exeOS-level CPU/mem/disk/net counters including Process V2
Dump analysisdotnet-dump analyze / WinDbgInspect objects, heap, threads in a dump
GC analysisdotnet-counters + PALGC frequency and pause time vs. thresholds
Report generationPython + Chart.jsDark-themed interactive HTML dashboard
Note: dotnet-dump, dotnet-counters, dotnet-trace, and dotnet-gcdump are all bundled with the .NET diagnostic tools. Install the .NET SDK and you have them all. WinDbg requires a separate install (see the Tool Downloads table below).

Core Workflow

Step 1 — Live Diagnostics: Real-Time Counters (No Code Changes)

Goal: Observe CPU, GC, and thread pool anomalies without restarting the app or adding logging.

# Install (if not already present)
dotnet tool install -g dotnet-counters

# List all available .NET processes
dotnet-counters ps

# Monitor a target process (PID or process name)
dotnet-counters monitor -p <PID> --counters "System.Runtime,Microsoft.AspNetCore.Http.Connections"

Key counters to watch (press Ctrl+C to stop):

CounterNormal rangeAlert signal
cpu-usage< 80%Consistently > 90%
gen-0-collected / sec< 1000Consistently > 5000
gen-1-collected / sec< 100Consistently > 500
gen-2-collected / sec< 10Consistently > 50
threadpool-queue-length< 10Consistently > 50
threadpool-thread-countApproaching ThreadPool MinThreads limit

Step 2 — Deep Sampling: dotnet-trace (Pinpoint Hot Methods)

Goal: Identify which methods consume the most CPU time.

# Install (if not already present)
dotnet tool install -g dotnet-trace

# Sample the target process for 60 seconds
dotnet-trace collect -p <PID> --duration 00:01:00 -o app_trace.nettrace

# (Works on Linux/macOS too — no .NET Runtime support dependency)

Open the resulting .nettrace file with:

  • Visual Studio 2022 (built-in Performance Viewer)
  • PerfView — free, supports CPU sampling, GC Heap, .NET Runtime events
  • dotnet-trace CLI (outputs Top-N methods directly)
# CLI report
dotnet-trace report app_trace.nettrace --type cpu

Step 3 — Dump Capture: dotnet-dump (Offline Deep Dive)

Goal: Capture a process dump at the moment of failure for post-mortem analysis.

# Install (if not already present)
dotnet tool install -g dotnet-dump

# List .NET processes
dotnet-dump ps

# Capture full dump
dotnet-dump collect -p <PID> -o app_dump.dmp

When to capture a dump:

  • CPU spike peak moment (capture immediately when dotnet-counters shows a spike)
  • Memory leak trend is clear (working set is growing continuously)
  • Requests are starting to timeout / thread pool is exhausting

Step 4 — Dump Analysis: dotnet-dump analyze (Managed Heap / Threads)

dotnet-dump analyze app_dump.dmp

# Common REPL commands:
dumpheap -stat              # Heap summary by type (find largest instances)
dumpheap -type <TypeName>  # All instances of a specific type
gcroot <object_address>     # GC Root chain (root cause of leaks)
threads                     # List all threads and their stacks
setclrpath <path>           # Set .NET Runtime path (required for full dumps)
Linux dump caveat: When analyzing a Linux .dmp on Windows, configure the SOS extension's Runtime path first: `` setclrpath /usr/share/dotnet/shared/Microsoft.NETCore.App/<version>/ ``

Step 5 — System-Level Metrics: perfmon + relog (Optional)

This is a Windows-only supplement for OS-level system resource visibility. If dotnet-counters already pinpointed the in-process issue, you can skip this step.

5.1 Collection Setup (perfmon GUI)

  1. Win+R → perfmon → Performance Monitor
  2. Right-click Data Collector Sets → User Defined → New
  3. Add these counters:
\Processor Information(_Total)\% Processor Time
\Processor(_Total)\% Processor Time
\System\Processor Queue Length
\Memory\Available MBytes
\Memory\Committed Bytes
\PhysicalDisk(_Total)\Avg. Disk Queue Length
\PhysicalDisk(_Total)\Avg. Disk sec/Read
\PhysicalDisk(_Total)\Avg. Disk sec/Write
\TCPv4\Segments Retransmitted/sec
\Process V2(*)\% Processor Time
\Process V2(*)\Working Set
\Process V2(*)\ID Process
\ASP.NET Applications(*)\Requests/Sec
\ASP.NET Apps v4.0.30319(*)\Requests Current
Use Process V2 instead of the legacy Process counter — Process V2 supports the name:PID format to distinguish multiple instances of the same process name (e.g., multiple w3wp.exe worker processes).

Recommended interval: 15 seconds (production monitoring) or 5 seconds (problem reproduction).

  1. Start collection, then export the .blg file when done.

5.2 BLG → CSV Conversion (using relog.exe)

Pitfall: Do NOT use PowerShell's Export-Counter -Format CSV (it still outputs BLG). Also avoid calling relog directly in PowerShell with quoted arguments — nested quotes break path parsing. Use System.Diagnostics.ProcessStartInfo instead.
# export_blg.ps1
$blgPath = "<path-to-BLG-file>"    # e.g., C:\Logs\DataCollector01.blg
$csvPath = "<output-CSV-path>"      # e.g., C:\Logs\output.csv

$psi = New-Object System.Diagnostics.ProcessStartInfo
$psi.FileName = "relog.exe"
$psi.Arguments = "`"$blgPath`" -f CSV -o `"$csvPath`" -y"
$psi.UseShellExecute = $false
$psi.RedirectStandardOutput = $true
$psi.RedirectStandardError  = $true
$psi.CreateNoWindow = $true

$proc = [System.Diagnostics.Process]::Start($psi)
$stdout = $proc.StandardOutput.ReadToEnd()
$stderr = $proc.StandardError.ReadToEnd()
$proc.WaitForExit()

if ($proc.ExitCode -eq 0 -and (Test-Path $csvPath)) {
    Write-Host "Success! Size: $([math]::Round((Get-Item $csvPath).Length/1MB,2)) MB"
}
relog.exe is a Windows built-in at C:\Windows\System32\ elog.exe — no separate install needed.

Step 6 — Python Analysis + HTML Report

Save the script below as analyze_perf.py, update csv_path and output_html, then run it.

# analyze_perf.py — perfmon BLG → Process CPU + System Baselines + PAL + HTML Report
# -*- coding: utf-8 -*-
import csv, os, re, sys, statistics
from collections import defaultdict

try:
    sys.stdout.reconfigure(encoding='utf-8', errors='replace')
    sys.stderr.reconfigure(encoding='utf-8', errors='replace')
except: pass

csv_path    = r"<path-to-CSV>"       # e.g., C:\Logs\output.csv
output_html = r"<output-HTML-path>"  # e.g., C:\Logs\perf_report.html

# ── Read CSV ─────────────────────────────────────────────────────────────────
with open(csv_path, 'r', encoding='utf-8', errors='replace') as f:
    all_rows = list(csv.reader(f))
headers   = all_rows[0]
data_rows = all_rows[1:]
print(f"Rows: {len(data_rows)}, Fields: {len(headers)}")

# ── Locate Process V2 % Processor Time counters ───────────────────────────────
# Format: \\HOSTNAME\Process V2(name:PID)\% Processor Time
proc_cpu_cols = {}
for i, h in enumerate(headers):
    if 'Process V2' in h and '% Processor Time' in h and '(_Total)' not in h:
        parts = h.split('\\')
        if len(parts) >= 4:
            m = re.search(r'Process V2\(([^:]+):(\d+)\)', parts[3])
            if m:
                proc_cpu_cols[i] = (m.group(1).lower(), m.group(2))
print(f"Found {len(proc_cpu_cols)} process CPU counters")

# ── Aggregate CPU by process name ────────────────────────────────────────────
proc_cpu_times = defaultdict(list)
for row in data_rows:
    snap = defaultdict(float)
    for ci, (pname, _) in proc_cpu_cols.items():
        if ci < len(row):
            v = row[ci].strip().strip('"')
            if v and v not in ('', 'N/A'):
                try: snap[pname] += float(v)
                except: pass
    for pname, val in snap.items():
        proc_cpu_times[pname].append(val)

# ── Statistics ────────────────────────────────────────────────────────────────
proc_stats = []
for pname, times in proc_cpu_times.items():
    if len(times) >= 3:
        srt = sorted(times)
        proc_stats.append({
            'name': pname, 'avg': statistics.mean(times),
            'max': max(times), 'p90': srt[int(len(srt)*0.9)], 'n': len(times)
        })
proc_stats.sort(key=lambda x: x['avg'], reverse=True)

print("\
Top 15 Processes by CPU:")
print(f"{'Rank':<4} {'Process':<28} {'Avg%':>7} {'Max%':>7} {'P90%':>7}")
for i, s in enumerate(proc_stats[:15], 1):
    print(f"{i:<4} {s['name']:<28} {s['avg']:>7.2f} {s['max']:>7.2f} {s['p90']:>7.2f}")

# ── System baseline counters ─────────────────────────────────────────────────
BASELINE = {
    'CPU%':         lambda h: 'Processor Information(_Total)' in h and '% Processor Time' in h,
    'Proc Queue':   lambda h: 'Processor Queue Length' in h,
    'Mem Avail MB': lambda h: 'Memory' in h and 'Available MBytes' in h,
    'Disk Queue':   lambda h: 'PhysicalDisk(_Total)' in h and 'Avg. Disk Queue' in h,
    'TCP Retrans':  lambda h: 'TCP' in h and 'Retransmitted' in h,
    'Disk Read ms': lambda h: 'PhysicalDisk(_Total)' in h and 'Disk sec/Read' in h,
    'Disk Write ms':lambda h: 'PhysicalDisk(_Total)' in h and 'Disk sec/Write' in h,
}
bl_cols = {}
for i, h in enumerate(headers):
    hc = h.strip()
    for name, fn in BASELINE.items():
        if fn(hc) and name not in bl_cols:
            bl_cols[name] = i

bl_stats = {}
for name, ci in bl_cols.items():
    vals = []
    for row in data_rows:
        v = row[ci].strip().strip('"') if ci < len(row) else ''
        if v and v not in ('', 'N/A'):
            try: vals.append(float(v))
            except: pass
    if vals:
        srt = sorted(vals)
        bl_stats[name] = {
            'avg': statistics.mean(vals), 'max': max(vals),
            'p90': srt[int(len(srt)*0.9)], 'n': len(vals)
        }

# ── PAL threshold check ───────────────────────────────────────────────────────
PAL = [
    ('CPU%',          85,  95),
    ('Proc Queue',     2,   4),
    ('TCP Retrans',    1,   5),
    ('Disk Queue',     2,   4),
    ('Disk Read ms',  10,  20),
    ('Disk Write ms', 10,  20),
]
print("\
PAL Threshold Check:")
for name, warn, crit in PAL:
    if name in bl_stats:
        s = bl_stats[name]
        st = 'CRITICAL' if s['max'] >= crit else ('WARNING' if s['max'] >= warn else 'OK')
        print(f"  [{st:8}] {name:<15} avg={s['avg']:>8.2f} max={s['max']:>8.2f} P90={s['p90']:>8.2f}")

# ── Time-series + high-CPU periods + HTML generation ──────────────────────────
# (See the full HTML generation code in the Chinese SKILL.md for the complete script)
print("\
Done. See the full HTML generation block for chart output.")
Python 3.8+ includes the statistics stdlib — no pip install needed. Chart.js is loaded via CDN, no local dependency either.

Step 7 — WinDbg: Advanced Dump Analysis

When dotnet-dump analyze is not enough (e.g., native heap, GC Card Table, Loader Heap analysis), use WinDbg (supports both kernel and user mode).

# Load SOS for managed heap analysis
.loadby sos clr                    # .NET 4 uses .loadby sos mscorwks
!dumpheap -stat                    # Heap summary
!gcroot <object_addr>             # GC Root tracing
!threads                           # All threads
!clrstack                          # Managed call stack
!dumpasync -roots                  # AsyncStateMachine leak detection
SOS / SOSEX extensions: .NET Framework: C:\Windows\Microsoft.NET\Framework64\<version>\sos.dll (built-in) .NET Core / .NET 5+: ships with dotnet-dump; load with .load <path>/sos.dll

Tool Download Reference

ToolDownloadNotes
.NET SDKhttps://dotnet.microsoft.com/download/dotnetInstall once, get all dotnet diagnostic tools
dotnet-dumpdotnet tool install -g dotnet-dumpBundled with SDK
dotnet-countersdotnet tool install -g dotnet-countersBundled with SDK
dotnet-tracedotnet tool install -g dotnet-traceBundled with SDK
dotnet-gcdumpdotnet tool install -g dotnet-gcdumpBundled with SDK
PerfViewhttps://github.com/Microsoft/perfview/releasesCPU sampling, GC Heap, .NET Runtime events
WinDbg (Store)https://apps.microsoft.com/detail/windbgModern WinDbg from Microsoft Store
WinDbg Previewhttps://apps.microsoft.com/detail/windbgUWP WinDbg with better UX
dotMemoryhttps://www.jetbrains.com/profiler/JetBrains — free CLI edition available
Windows Performance Toolkithttps://developer.microsoft.com/en-us/windows/downloads/windows-sdk/Includes WPR and WPA for WPR trace analysis
All dotnet diagnostic tools are installed via dotnet tool install -g <tool-name>. For offline environments, pre-download on a machine with internet access first.

.NET Performance Troubleshooting Quick Reference

SymptomFirst checkTool
CPU continuously highTop methods, full samplingdotnet-trace + PerfView CPU view
CPU intermittent spikesGC pauses, high-frequency GCdotnet-counters watching GC counters
Memory continuously growingManaged heap leakdotnet-dump + dumpheap -stat
Memory leak persists after GCLarge object heap, GC Rootdotnet-dump analyze + gcroot
Request queue backlogIIS AppPool Queue Length, thread poolperfmon Processor Queue + dotnet-counters
GC pause time too longGC event pause timedotnet-counters GC pause time / PerfView GC events
Thread pool exhaustionQueue Length + Thread Countdotnet-counters threadpool-*
Slow HTTP requestsHot request paths, DB callsdotnet-trace + custom trace sources
Slow startupNGEN, Assembly Load, JITPerfView Startup diagnostics

PAL 2.8.1 .NET / IIS Reference Thresholds

CounterWarningCriticalNotes
Processor(_Total)\% Processor Time85%95%
System\Processor Queue Length24
\ASP.NET Apps v4.0.30319(*)\Requests Executing4080IIS-hosted .NET 4.x
\ASP.NET Apps v4.0.30319(*)\Requests Wait1025
TCP\Segments Retransmitted/sec15
PhysicalDisk\Avg. Disk Queue Length24
PhysicalDisk\Avg. Disk sec/Read (ms)10 ms20 ms
PhysicalDisk\Avg. Disk sec/Write (ms)10 ms20 ms
Memory\% Committed Bytes In Use80%90%
PAL (Performance Analysis of Logs) is Microsoft's official IIS/DotNet performance baseline tool. Download: https://github.com/clinthuffman/PAL

Common Pitfalls & Fixes

ProblemCauseFix
dotnet-counters ps can't find the processProcess is 32-bit or running on a different RuntimeCheck .NET Runtime version, use dotnet-counters ps -v for details
dotnet-trace fails on LinuxMissing lttng or insufficient permissionsUse sudo dotnet-trace collect ... or install lttng
.loadby sos clr fails in WinDbg32/64-bit mismatch or Runtime version issueUse .load <full-path>\sos.dll, confirm correct bitness
Dump file is huge (tens of GB)Captured full dump from a large-memory appUse dotnet-dump collect -m 1 to limit to heap-only dump
CSV columns are misalignedrelog.exe vs Export-Counter — the latter omits quotes around valuesAlways use relog.exe for CSV export
Can't find Process V2 countersCollected using the legacy Process counter insteadRe-collect with Process V2 checked in perfmon
SOS commands fail in dotnet-dump analyzeFull dump requires Runtime path to be setRun setclrpath <dotnet-shared-lib-path> before SOS commands
Windows console shows garbled text for emojicp936 encoding doesn't support emojiAdd sys.stdout.reconfigure(encoding='utf-8') at the top of the script
High GC frequency but heap size is stableMany short-lived objects — may be normal or an allocation pattern issueUse dotnet-trace sampling to identify allocation hotspots

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

73.2%
按下载量换算201

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills