A modern strace replacement with a real-time interactive TUI, per-syscall latency statistics, percentile histograms, anomaly alerts and an HTTP API for serving Prometheus metrics and a web dashboard.
- Real-time TUI and offline analysis of saved traces
- Per-syscall P95/P99, errno breakdowns, recent error samples and alerts
- Multiple backends: classic
stracesubprocess tracer or Linux eBPF (recommended) - Optional HTTP dashboard and Prometheus metrics (
--serve) - Privacy-focused features for redaction and export of sanitized event logs
- Source: main.go
- CLI entrypoint and flags: cmd/root.go
- Build & helper targets: Makefile
- User docs: docs/USAGE.md
- Go (project uses
go 1.26.1) — see go.mod - Optional: clang + bpf2go to generate eBPF artifacts when using the eBPF backend
- Docker (for image targets) and Hugo (to build the docs site)
Build the binary (outputs bin/stracectl):
make buildBuild with eBPF support (requires clang + bpf2go):
make build-ebpfRun directly with Go:
make run ARGS="run curl https://example.com"Or build the Docker image:
make docker-buildTrace a command from start (TUI):
stracectl run curl https://example.comTrace and write a self-contained HTML report:
stracectl run --report out.html curl https://example.comTrace and group rows by PID (useful for multi-process workloads):
stracectl run --per-pid -- python3 app.pyAttach to a running PID:
stracectl attach 1234Attach and expose an HTTP dashboard + Prometheus metrics:
stracectl attach --serve :8080 1234Analyse a saved strace file:
stracectl stats trace.log
stracectl stats --report report.html trace.log
stracectl stats --per-pid trace.logAuto-discover a container PID in a Pod or provide a container name:
stracectl discover myappFor more examples and options, see the CLI help or the usage docs in docs/USAGE.md.
stracectl includes several privacy-related flags to control capture and
redaction of syscall arguments and payloads (see --no-args, --max-arg-size,
--redact-patterns, --privacy-level, --privacy-log, etc.). Use --full
only with care as it may expose sensitive data. The CLI can emit newline-
delimited redacted JSON events for downstream processing.
- Run unit tests:
make test- Generate BPF artifacts (requires
clangandbpf2go):
make generate-bpf- Format, vet and lint using the provided Make targets:
make fmt
make vet
make lint- Build and serve the site locally (Hugo):
make site-devContributions are welcome. Please follow the established project style,
run tests, and open a PR describing the change. See docs/PROJECT_STRUCTURE.md
and other files under docs/ for project guidance.
This project is licensed under the terms found in the LICENSE file.
- Architecture and design notes:
docs/ARCHITECTURE_DIAGRAM.md,docs/SYSTEM_DESIGN.md - Usage guides and flows:
docs/USAGE.md,docs/LOCAL_USAGE.md - eBPF details:
docs/EBPF.md