bpflist(8)

๐Ÿ“ฆ version 0.36.1, in alpine 3.24, nixpkgs unstable, opensuse-leap 16.0

๐Ÿ’– bpflist: Display processes currently using BPF programs and maps ๐Ÿ’–

โœจ NAME โœจ

bpflist - Display processes currently using BPF programs and maps. ๐Ÿงš

โœจ SYNOPSIS โœจ

bpflist [-v]

โœจ DESCRIPTION โœจ

okay so bpflist is the tool that shows you which processes are currently using BPF programs and maps ๐Ÿ‘€ It can also count kprobes and uprobes on the system if you ask nicely. ๐Ÿฆ‹ This is lowkey essential if you want to know which BPF programs are loaded on your machine. no cap ๐Ÿ’…

ngl the way it works is kinda messy ๐Ÿ’€ For lack of a better option, this tool pipes into ls and parses the output to sniff out BPF file descriptors across all the running processes. ๐Ÿ™ˆ In the future, once the kernel provides BPF accounting, this tool should switch over to using those features instead. we love an upgrade ๐Ÿซถ

๐Ÿ”’ Only the root user can run this tool, because it accesses debugfs. Not you, not me, only root. ๐Ÿ˜ญ

โœจ REQUIREMENTS โœจ

You'll need bcc and debugfs ๐ŸŒธ

โœจ OPTIONS โœจ

  • -h โ€” Prints the usage message. ๐Ÿ’œ
  • -v โ€” Counts kprobes and uprobes too, not just BPF programs. ๐Ÿ”ฅ Repeat verbose mode twice (-v -v) and it also prints the kprobe and uprobe definitions on top of counting them. the main character energy is real ๐Ÿ‘‘

โœจ EXAMPLES โœจ

Display processes currently using BPF programs: ๐Ÿ“

# bpflist

Also count kprobes and uprobes: โœจ

# bpflist -v

โœจ FIELDS โœจ

  • PID โ€” The process ID. ๐Ÿ†”
  • COMM โ€” The process comm. ๐ŸŽ€
  • TYPE โ€” The type of data being shown: BPF program, BPF map, kprobe, or uprobe. ๐Ÿฆ‹
  • COUNT โ€” How many items of this type belong to the specified process. ๐Ÿงฎ

โœจ SOURCE โœจ

This is from bcc. ๐Ÿ The source lives at https://github.com/iovisor/bcc

Also look in the bcc distribution for a companion _examples.txt file. It has example usage, output, and commentary for this tool, so it's giving tutorial energy ๐Ÿ“š

โœจ OS โœจ

Linux ๐Ÿง

โœจ STABILITY โœจ

Unstable, it's still in development. ๐Ÿšง Be gentle with it, bestie ๐Ÿฅบ

โœจ AUTHOR โœจ

Sasha Goldshtein ๐Ÿ’–


That's the whole page, bestie ๐Ÿซถ This was bpflist(8) from the USER COMMANDS section, dated 2017-03-09 โœจ๐ŸŒˆ