Setup
Installation on Debian/Ubuntu¶
- Add the BCC repository (note: the PPA may not always provide the latest version; check official documentation for current repositories): Alternatively, you can install from the official BCC repository or build from source for newer versions. For example, to use the official repo, add: Or clone the GitHub repository and build manually.
- Install BCC:
This installs
bpftrace, a core BCC tool for eBPF scripting. - Verify installation:
Installation on Red Hat/CentOS¶
- Install BCC tools via package manager (note: hardcoded version numbers in repositories may be outdated; check the official BCC release repository for the correct version):
For newer versions, add the official BCC repository (replace
{version}with the desired release, e.g., 0.23.0):sudo rpm --import https://github.com/iovisor/bcc/releases/download/bcc-0.23.0/RPM-GPG-KEY-iovisor echo '[bcc] name=BCC baseurl=https://github.com/iovisor/bcc/releases/download/bcc-0.23.0/rhel/8/x86_64/ gpgcheck=1 gpgkey=https://github.com/iovisor/bcc/releases/download/bcc-0.23.0/RPM-GPG-KEY-iovisor enabled=1' | sudo tee /etc/yum.repos.d/bcc.repo sudo yum install bcc-tools - Verify installation: