Skip to content

Quick start

The collector runs on each machine it observes, as root, on Linux only. Docker needs no toolchain on the host: the image builds its own Rust nightly, LLVM and bpf-linker, so the first build takes a while.

  • Linux with eBPF and tracefs, which any recent distribution kernel has. mount | grep tracefs shows /sys/kernel/tracing.
  • cgroup v2.
  • Root, or a privileged container.
Terminal window
git clone https://github.com/danielcristho/croft.git
cd croft
docker build -f deploy/docker/Dockerfile -t croft-collector .
sudo mkdir -p /var/lib/croft
just docker-up

just docker-up runs the image with the flags it needs. Without just, see Docker.

Terminal window
docker exec -it croft-collector croft top # processes of the newest poll
docker exec -it croft-collector croft stats # dataset summary

By default only processes holding a GPU get rows. To record every process of some containers, GPU or not, set WATCH_CGROUPS:

Terminal window
WATCH_CGROUPS=docker-<container-id> just docker-up

The dataset is in /var/lib/croft/croft-dataset.jsonl; Dataset describes a row.