# 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. ## Install Save as a script file and run: # Witr — Why Is This Running? Process Inspector ## Quick Use ```bash go install github.com/pranshuparmar/witr@latest witr ``` ## 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 - https://github.com/pranshuparmar/witr --- Source: https://tokrepo.com/en/workflows/asset-c721af95 Author: Script Depot