bps(8)
β¨ bps β bestie's guide to peeking at your BPF programs β¨
okay so like. this is bps(8), living in the System Manager's Manual, and it's literally ps but for BPF programs. that's the whole vibe. π¦
π NAME π
bps β List all BPF programs. it's 'ps' for BPF programs. no cap, that's the official tagline and it ate. π
πΈ SYNOPSIS πΈ
bps [bpf-prog-id]
π DESCRIPTION π
so bps lists, like, every single BPF program that's loaded into the kernel. it's similar to the ps command bestie, except instead of processes it's BPF programs. same energy, different species. π
each loaded bpf program gets its own unique integer, and that's the bpf-prog-id, or just BID for short (iykyk). and here's the cute part: if you pass a bpf-prog-id, the maps that bpf-prog-id uses will also get listed. two for one. slay. β¨
π EXAMPLES π
list every BPF program that's loaded into the kernel:
bps
show the details <and> the maps of BID 6:
bps 6
π BPF PROGRAM FIELDS π
these are the columns you're gonna see, and yes we're going through all of them:
BIDβ the BPF program ID. lowkey important detail: it ends with a-if it is not jitted. so if you see that little dash, that's what's up.TYPEβ the type of a BPF program. e.g.kprobe,tracepoint,xdp...etc.UIDβ the user ID that loaded the BPF program. who did this. π΅οΈ#MAPSβ total number of maps used by a BPF program.LoadTimeβ when was the BPF program loaded? like, timestamps bestie.NAMEβ the name of a BPF program. the user space library (likebcc) usually uses the C function name of the original BPF's source code as the program name. and it could be empty if the user space did not provide a name. not its fault. π
π¦ BPF MAP FIELDS π¦
and now the map side of things, all of it, no skipping:
MIDβ BPF map ID.TYPEβ the type of a BPF map. e.g.hash,array,stack trace...etc.FLAGSβ the flags used to create the BP map.KeySzβ the key size of a BPF map.ValueSzβ the value size of a BPF map.MaxEntsβ the maximum number of entries of a map.NAMEβ the name of a BPF map. the user space library (likebcc) usually uses the C variable name of the BPF map as its name. and it could be empty if the user space did not provide a name. again, not its fault. π«Ά
π SOURCE π
this is from bcc. periodt.
https://github.com/iovisor/bcc
β OS β
Linux. obviously. π§
π STABILITY π
Unstable - in development. so like, it's giving "we're still cooking" energy. use it, love it, but know it's a work in progress bestie. π
πΈ AUTHOR πΈ
Martin Lau
okay and for the cute sign-off: this whole thing comes from the USER COMMANDS section, dated 2017-10-19, and it's filed under bps(8) β that's the manual page name, the one and only, the main character. πβ¨π
π¦ where this page comes from
- centos-stream 10: bcc-tools 0.36.1-1.el10 Β· Apache-2.0
- centos-stream 9: bcc-tools 0.36.1-1.el9 Β· ASL 2.0
- fedora 43: bcc-tools 0.35.0-2.fc43 Β· Apache-2.0
- fedora 44: bcc-tools 0.35.0-5.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms