BCC helps write and run kernel BPF programs from Python or Lua front ends, shipping many CLI tools for performance, networking, and storage introspection on Linux.
Overview
The BPF Compiler Collection wraps extended Berkeley Packet Filter bytecode so operators can safely instrument a live Linux kernel without loading risky kernel modules. Authors write probes in C with LLVM backing, then control them through Python or Lua scripts that aggregate histograms, counts, and latency summaries in the kernel before returning compact results to user space.
Dozens of bundled utilities cover block I/O, filesystem latency, scheduler behavior, TCP sessions, SSL traffic, language runtimes such as Node.js or Java, and security events like capability checks or OOM kills. Examples demonstrate custom histograms, kprobe tracing, tracepoints, and USDT probes in databases or application servers.
Most features expect recent Linux releases where eBPF attachments to kprobes and tracepoints are mature. Programs are sandboxed so faulty instrumentation should not crash the host, and the collection also ships helpers for traffic control, bridges, and lightweight networking experiments.
Installation steps vary by distribution; reference guides document APIs for extending or combining tools in performance triage workflows.
Key features
- Python and Lua front ends over C BPF programs
- In-kernel histograms and summaries for efficiency
- Large catalog of prebuilt tracing CLI tools
- Kprobes, tracepoints, and USDT probe support
- CPU, scheduler, and off-CPU profiling utilities
- TCP, socket, and SSL traffic introspection
- Block and filesystem latency analyzers
- Networking policy and traffic-control examples
Use cases
- Production Linux performance troubleshooting
- Network connection and retransmit diagnosis
- Database query latency tracing
- Kernel memory and slab leak hunting
- Custom eBPF observability prototypes