Scripts2026年5月26日·1 分钟阅读

Witr — Why Is This Running? Process Inspector for Go

A lightweight CLI tool written in Go that answers the question "why is this process running?" by tracing process ancestry, triggers, and resource consumption.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Witr Overview
直接安装命令
npx -y tokrepo@latest install c721af95-58db-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Witr (Why Is This Running?) is a Go-based process inspector that helps developers and system administrators understand why specific processes are running on their machines. Instead of just listing processes like ps or top, Witr traces the ancestry chain and explains what triggered each process.

What Witr Does

  • Shows process trees with parent-child relationships and launch triggers
  • Identifies which service, cron job, or user action started a process
  • Displays resource usage (CPU, memory) alongside process context
  • Filters processes by name, PID, or resource thresholds
  • Provides a clean terminal UI for interactive exploration

Architecture Overview

Witr reads from the OS process table and reconstructs the full process tree by walking parent PIDs. It enriches each entry with metadata from systemd units, cron schedules, and shell history where available. The Go implementation keeps it fast and portable across Linux and macOS without external dependencies.

Self-Hosting & Configuration

  • Install with go install or download a pre-built binary from releases
  • No configuration file needed — works out of the box
  • Supports Linux and macOS process inspection
  • Run with elevated privileges for full system-wide visibility
  • Pipe output to other tools or export as JSON

Key Features

  • Traces full process ancestry to explain why something is running
  • Zero-dependency single binary written in Go
  • Interactive TUI mode for exploring the process tree
  • JSON output for scripting and automation
  • Fast startup with minimal resource footprint

Comparison with Similar Tools

  • htop/btop — shows what is running; Witr explains why it is running
  • pstree — shows tree structure; Witr adds context about triggers and resources
  • procs — modern ps replacement; Witr focuses on causal explanation
  • systemctl status — systemd only; Witr covers all process sources

FAQ

Q: Does it work on macOS? A: Yes, Witr supports both Linux and macOS process inspection.

Q: Does it need root access? A: Basic usage works without root. Full system visibility may require elevated privileges.

Q: Can I use it in scripts? A: Yes, it supports JSON output for easy integration with other tools and pipelines.

Q: How is it different from just running ps aux? A: Witr adds the "why" — it traces process ancestry and identifies what triggered each process.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产