Section 8 · System administration

bcc-bps.8

Package: bcc-tools

bps

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
BPF PROGRAM FIELDS
BPF MAP FIELDS
SOURCE
OS
STABILITY
AUTHOR


NAME

bps − List all BPF programs. ’ps’ for BPF programs.

SYNOPSIS

bps [bpf-prog-id]

DESCRIPTION

bps lists all BPF programs loaded into the kernel. It is similar to the ps command but for the BPF programs.

Each loaded bpf program is identified by an unique integer (i.e. bpf-prog-id or simply BID). If a bpf-prog-id is specified, the maps used by bpf-prog-id will also be listed.

EXAMPLES

List all BPF programs loaded into the kernel:

bps

Show the details and maps of BID 6:

bps 6

BPF PROGRAM FIELDS

BIDBPF program ID. It ends with ’-’ if it is not jitted.
TYPEThe type of a BPF program. e.g. kprobe, tracepoint, xdp…etc.
UIDThe user ID that loaded the BPF program.
#MAPSTotal number of maps used by a BPF program.

LoadTime

When was the BPF program loaded?

NAMEThe name of a BPF program. The user space library (like bcc ) usually uses the C function name of the original BPF’s source code as the program name. It could be empty if the user space did not provide a name.

BPF MAP FIELDS

MIDBPF map ID.
TYPEThe type of a BPF map. e.g. hash, array, stack trace…etc.
FLAGSThe flags used to create the BP map.
KeySzThe key size of a BPF map.

ValueSz

The value size of a BPF map.

MaxEnts

The maximum number of entries of a map.

NAMEThe name of a BPF map. The user space library (like bcc ) usually uses the C variable name of the BPF map as its name. It could be empty if the user space did not provide a name.

SOURCE

This is from bcc.

https://github.com/iovisor/bcc

OS

Linux

STABILITY

Unstable - in development.

AUTHOR

Martin Lau