This repository hosts my personal implementations of BPF (Berkeley Packet Filter) tools and scripts for advanced Linux systems performance analysis.
To run these tools, you need a Linux environment with:
- Root privileges (
sudo) - A kernel that supports eBPF (Linux 5.5+ and my personal opinion recommended 6.x or 7.x)
Depending on the tool:
- Python/BCC tools - Python 3 and BCC installed (
bpfcc-toolsorbcc-tools) - C/libbpf tools built with eunomia - the eunomia-bpf toolchain:
ecc(compiler) andecli(runner) - C/libbpf tools built with make -
clang,llvm,libbpf-dev,bpftool,libelf-dev,zlib1g-dev
Most tools require root access to load BPF programs into the kernel.
cd tsastat
sudo ./tsastat.pyCompile the BPF source into a package, then run it:
cd openlat-v1
ecc openlat.c openlat.h
sudo ecli run package.jsoncd acceptlat
make
sudo ./acceptlatgo mod tidy
go generate ./...
GOOS=linux GOARCH=amd64 go build -o ebpf-load-balancer-l4
sudo ./ebpf-load-balancer-l4Special thanks to Brendan Gregg for his work and inspiration in the field of systems performance, and especially in BPF.
Thanks to the eunomia-bpf project for the ecc/ecli toolchain and the bpf-developer-tutorial, which the C/libbpf tools here are built with and learned from.
All code in this repository was written entirely by me for testing and educational purposes.
But for some tool descriptions, however, were generated with the assistance of AI.
Some of the code in this repository was copied from the bpf-developer-tutorial and subsequently modified by me for learning and experimentation. The original code and project are credited above.