bpftop provides a dynamic real-time view of running eBPF programs. It displays the average runtime, events per second, and estimated total CPU % for each program.
APACHE-2.0 License
bpftop
provides a dynamic real-time view of running eBPF programs. It displays the average runtime, events per second, and estimated total CPU % for each program. It also provides graphical views of these statistics over time. This tool minimizes overhead by enabling performance statistics only while it is active.
To download the latest x86_64 release of bpftop
, use the following command:
curl -fLJ https://github.com/Netflix/bpftop/releases/latest/download/bpftop-x86_64-unknown-linux-gnu -o bpftop && chmod +x bpftop
or install via your distribution's package manager:
You can install bpftop
from the official repositories using dnf:
sudo dnf install bpftop
You can install bpftop
from the official repositories using pacman:
sudo pacman -S bpftop
You can install bpftop from the NixOS 24.05 stable channel:
nix-channel --add https://nixos.org/channels/nixos-24.05 nixpkgs
nix-channel --update
nix-env -iA nixpkgs.bpftop
bpftop
requires sudo
privileges to run.libz
and libelf
, so these libraries must be present on the systems where you intend to run bpftop
.Run the following command to start bpftop
on your host:
sudo ./bpftop
bpftop
uses the BPF_ENABLE_STATS BPF syscall command to enable global eBPF runtime statistics gathering, which is disabled by default to reduce performance overhead. It collects these statistics every second, calculating the average runtime, events per second, and estimated CPU utilization for each eBPF program within that sample period. This information is displayed in a top-like tabular format. Once bpftop
terminates, it disables the statistics-gathering function by deleting the file descriptor returned by BPF_ENABLE_STATS
.
cross build --release
for x86_64cross build --target=aarch64-unknown-linux-gnu --release
for Arm64