1BPFTOOL(8) BPFTOOL(8)
2
3
4
6 BPFTOOL - tool for inspection and simple manipulation of eBPF programs
7 and maps
8
10 bpftool [OPTIONS] OBJECT { COMMAND | help }
11
12 bpftool batch file FILE
13
14 bpftool version
15
16 OBJECT := { map | program | link | cgroup | perf | net | feature |
17 btf | gen | struct_ops | iter }
18
19 OPTIONS := { { -V | --version } | { -j | --json } [{ -p | --pretty
20 }] | { -d | --debug } | { -l | --legacy } }
21
22 MAP-COMMANDS := { show | list | create | dump | update | lookup |
23 getnext | delete | pin | event_pipe | help }
24
25 PROG-COMMANDS := { show | list | dump jited | dump xlated | pin |
26 load | attach | detach | help }
27
28 LINK-COMMANDS := { show | list | pin | detach | help }
29
30 CGROUP-COMMANDS := { show | list | attach | detach | help }
31
32 PERF-COMMANDS := { show | list | help }
33
34 NET-COMMANDS := { show | list | help }
35
36 FEATURE-COMMANDS := { probe | help }
37
38 BTF-COMMANDS := { show | list | dump | help }
39
40 GEN-COMMANDS := { object | skeleton | min_core_btf | help }
41
42 STRUCT-OPS-COMMANDS := { show | list | dump | register | unregister
43 | help }
44
45 ITER-COMMANDS := { pin | help }
46
48 bpftool allows for inspection and simple modification of BPF objects
49 on the system.
50
51 Note that format of the output of all tools is not guaranteed to be
52 stable and should not be depended upon.
53
55 -h, --help
56 Print short help message (similar to bpftool help).
57
58 -V, --version
59 Print bpftool's version number (similar to bpftool version),
60 the number of the libbpf version in use, and optional fea‐
61 tures that were included when bpftool was compiled. Optional
62 features include linking against libbfd to provide the disas‐
63 sembler for JIT-ted programs (bpftool prog dump jited) and
64 usage of BPF skeletons (some features like bpftool prog pro‐
65 file or showing pids associated to BPF objects may rely on
66 it).
67
68 -j, --json
69 Generate JSON output. For commands that cannot produce JSON,
70 this option has no effect.
71
72 -p, --pretty
73 Generate human-readable JSON output. Implies -j.
74
75 -d, --debug
76 Print all logs available, even debug-level information. This
77 includes logs from libbpf as well as from the verifier, when
78 attempting to load programs.
79
80 -l, --legacy
81 Use legacy libbpf mode which has more relaxed BPF program re‐
82 quirements. By default, bpftool has more strict requirements
83 about section names, changes pinning logic and doesn't sup‐
84 port some of the older non-BTF map declarations.
85
86 See
87 https://github.com/libbpf/libbpf/wiki/Libbpf:-the-road-to-v1.0
88 for details.
89
90 -m, --mapcompat
91 Allow loading maps with unknown map definitions.
92
93 -n, --nomount
94 Do not automatically attempt to mount any virtual file system
95 (such as tracefs or BPF virtual file system) when necessary.
96
98 bpf(2), bpf-helpers(7), bpftool-btf(8), bpftool-cgroup(8),
99 bpftool-feature(8), bpftool-gen(8), bpftool-iter(8),
100 bpftool-link(8), bpftool-map(8), bpftool-net(8), bpftool-perf(8),
101 bpftool-prog(8), bpftool-struct_ops(8)
102
103
104
105
106 BPFTOOL(8)