← back

kwatch

An eBPF process monitor. Built to learn eBPF, not for production.

built
March 2026
stack
C and eBPF in the kernel, Go in userspace, Rust terminal UI, React web view
runs on
Linux 5.8+ with BTF
code
github.com/ismajl-ramadani/kwatch-ebpf

Why

Security tools like Falco and Tetragon, and the EDR agents I worked next to at Cybee, all see what a machine is doing through eBPF: small programs that run inside the Linux kernel and report events as they happen. I wanted to understand that layer properly, so I wrote a small one myself, from the kernel hooks up to a live dashboard.

How it works

kwatch architecture: eBPF programs on kernel tracepoints write events to a ring buffer; a Go agent reads them, enriches them from /proc, keeps a process snapshot and fans events out to stdout, Prometheus, WebSocket and MQTT; a Rust TUI and a web view read the WebSocket. Linux kernel tracepoints exec, exit, network, files eBPF programs (C) ring buffer, 16 MB Go agent enrich from /proc process snapshot output fan-out stdout JSON Prometheus MQTT WebSocket terminal UI Rust, ratatui web view React

What it traces

Each event is enriched in userspace from /proc (executable path, working folder, memory, open files) the moment it arrives, before the process can disappear.

Things I learned the hard way

Outputs and tools around it