
Stallhunt
io.github.guillem由 GitHub 帳號 guillem 發布v0.5.1更新於 Oct 24, 2026
Evidence-backed Linux performance triage over MCP
概覽
本機 Linux 效能診斷伺服器,讓編碼助理查詢所在機器上 CPU、記憶體與 I/O 停滯的有證據支撐診斷結論。
- 可以做什麼
- 查詢究竟是什麼在限制有效工作、誰在受影響、誰可能是肇因
- 讀取 CPU 排程爭用、記憶體壓力與區塊 I/O 的壓力判定,含逐程序歸因與信心程度
- 透過常駐取樣器取得近期壓力的滾動檢視以快速回答,也可關閉取樣器
- 以有界觀測視窗與結構化 JSON 證據為基礎,而非原始使用率數字
- 適用情境
- 適合在 Linux 機器變慢或過載、需要判斷哪個程序拖累其他程序時使用,而不只是看 top 或 vmstat 的輸出。它著重在被調查主機本機上的本機診斷,而非遠端機群監控。
- 執行需求
- 以本機程序方式執行(stdio),以 Linux MCPB 套件散布;從原始碼建置需 Rust 1.85 或更新版本。需要 Linux 4.20 或更新版本、已掛載 procfs,且 /proc/pressure 下的 PSI 檔案可讀才能給出壓力判定。未宣告帳號、API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Stallhunt,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Stallhunt
Stallhunt is a Linux-first command-line performance triage tool.
Repository: https://github.com/guillem/stallhunt
Traditional tools such as top, htop, iotop, vmstat, and iostat expose measurements. They are excellent tools, but the human operator still has to answer the harder question:
What is actually constraining useful work right now, who is suffering, and who is probably responsible?
Stallhunt aims to automate that reasoning.
Install
Requirements:
- Linux 4.20 or newer with procfs mounted; readable PSI files under
/proc/pressureare required for pressure verdicts, - Rust 1.85 or newer for source builds.
See docs/install.md for cargo install, release tarballs, and the support matrix.
From a clone:
Bare stallhunt runs a default 10-second hunt. On a terminal it renders a
compact, color-coded report; piped or redirected output (stallhunt | cat,
>file, CI) is unchanged plain text. Use --json for the full structured
evidence, --verbose to expand the compact report's collapsed caveats back
to full text, or --no-color (also NO_COLOR=1) to disable color without
changing the layout:
Capture and replay a normalized observation:
Follow finding lifecycle for a bounded number of rolling windows. On a
terminal this opens a full-screen TUI (q quit, arrows/jk select,
Enter/Space show or hide detail, PageUp/PageDown/Home/End scroll,
h/? help). At 120×30 or larger it also shows the selected host/cgroup's
six process-role lists beside the lifecycle panels; piped output or
--json remain append-only text/JSON and carry the same scoped roles:
Serve Model Context Protocol tools over stdio so coding agents can query
diagnoses directly — a resident sampler keeps a rolling view of recent
pressure for instant answers (for Claude Code: claude mcp add stallhunt -- stallhunt mcp; see docs/mcp-server.md):
Source packaging for an OpenAI local plugin, a Linux MCPB extension for
compatible clients, and official MCP Registry metadata lives in the
repository. These packages deliberately keep diagnosis local instead of
hosting Stallhunt on a machine other than the one being investigated. See
docs/directory-distribution.md.
Generate shell completions:
Recording output paths are not overwritten unless --force is supplied. Ten-second hunts are the normal diagnostic path; sub-second observations are telemetry smoke tests and do not receive healthy or pressure verdicts. See docs/development.md for validation and opt-in acceptance commands.
Core idea
The primary abstraction is lost time, not utilization.
High utilization is not automatically a problem. A machine using 95% of its RAM may be perfectly healthy. A CPU at 70% utilization may still have latency-sensitive work suffering from scheduler contention. The project therefore focuses on evidence of stalled progress:
- CPU scheduler pressure,
- I/O stalls,
- memory pressure/reclaim,
- lock contention,
- network-related waits,
- eventually deeper blocking chains.
Example output shape:
This output is aspirational; the project will reach it incrementally.
Product principles
- Diagnose, do not merely display.
- Measure stalled progress whenever possible.
- Separate observation from inference.
- Show evidence for every diagnosis.
- Express uncertainty explicitly.
- Remain useful without eBPF.
- Stay cheap enough to run on a stressed system.
- Treat Git as the complete project memory.
Initial scope
The first useful release targets Linux and focuses on:
- CPU scheduling contention,
- memory pressure,
- block I/O pressure,
- per-process attribution where Linux exposes enough evidence,
- cgroup/systemd-aware grouping when practical,
- human-readable terminal output,
- versioned machine-readable JSON (the pre-1.0 shape may evolve),
- bounded observation windows,
- deterministic offline fixture/replay analysis.
Later releases may add:
- eBPF-based off-CPU analysis,
- futex/lock contention,
- syscall/blocking attribution,
- network queue/socket diagnosis,
- dependency/wait graphs,
- richer cgroup/container analysis.
Repository map
Start with AGENTS.md, then docs/README.md.
Privacy Policy
Stallhunt reads bounded local Linux telemetry and does not independently send it over the network. MCP clients may transmit tool results according to their own data policies. See the full Stallhunt privacy policy for the data, storage, sharing, retention, and contact disclosures.
License
Dual-licensed under MIT or Apache-2.0, at your option.
Current state
For the current milestone, implemented capabilities, validation, known limits,
and the next recommended task, see docs/status.md. Planned
sequencing remains in docs/roadmap.md.
來源:README.md,提交 2df52cc
工具
0版本歷史
1- v0.5.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分