Skip to main content
Filetrace is written in C23 and builds with CMake. On Linux the build produces both programs with their BPF probes embedded; on macOS only the command-line interface and the unit tests build. Release builds link statically, so a binary from a release archive needs nothing installed beside it.

Dependencies

tools/dev/Dockerfile in the repository lists the Debian packages. On macOS, brew install protobuf-c libnghttp2 provides the last two.

Build

The build tree holds build/filetrace and build/filetrace-agent. The C code generated from the protobuf schemas is committed under gen/, so building needs neither Buf nor network access.

Run the tests

The unit tests run on Linux and macOS. integration-auto and integration-kprobe need root and a kernel that supports the probes, and are skipped otherwise. They start the agent with the probe set the kernel prefers and with the kprobe set, generate real transfers, and check exact byte counts, rates, confidence levels and the output of every command.

Develop on macOS

Collection needs a Linux kernel. From macOS, tools/dev/linux.sh <command> runs a command in a Linux container with the source tree mounted at /src, and this runs the demo, which builds the project, starts the agent, generates transfers and walks through the commands:
The container sees the kernel it runs on: under Docker Desktop that is the Docker VM, not the macOS host. The repository’s CONTRIBUTING.md describes the development workflow, the pinned tools and the checks that continuous integration runs.