xref: /linux/tools/bpf/bpftool/Documentation/bpftool.rst (revision 695c62a823a5798245a5a9c99ea62b65d6f50d6e)
1.. SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2
3================
4BPFTOOL
5================
6-------------------------------------------------------------------------------
7tool for inspection and simple manipulation of eBPF programs and maps
8-------------------------------------------------------------------------------
9
10:Manual section: 8
11
12.. include:: substitutions.rst
13
14SYNOPSIS
15========
16
17	**bpftool** [*OPTIONS*] *OBJECT* { *COMMAND* | **help** }
18
19	**bpftool** **batch file** *FILE*
20
21	**bpftool** **version**
22
23	*OBJECT* := { **map** | **program** | **link** | **cgroup** | **perf** | **net** | **feature** |
24	**btf** | **gen** | **struct_ops** | **iter** }
25
26	*OPTIONS* := { { **-V** | **--version** } | |COMMON_OPTIONS| }
27
28	*MAP-COMMANDS* :=
29	{ **show** | **list** | **create** | **dump** | **update** | **lookup** | **getnext** |
30	**delete** | **pin** | **event_pipe** | **help** }
31
32	*PROG-COMMANDS* := { **show** | **list** | **dump jited** | **dump xlated** | **pin** |
33	**load** | **attach** | **detach** | **help** }
34
35	*LINK-COMMANDS* := { **show** | **list** | **pin** | **detach** | **help** }
36
37	*CGROUP-COMMANDS* := { **show** | **list** | **attach** | **detach** | **help** }
38
39	*PERF-COMMANDS* := { **show** | **list** | **help** }
40
41	*NET-COMMANDS* := { **show** | **list** | **help** }
42
43	*FEATURE-COMMANDS* := { **probe** | **help** }
44
45	*BTF-COMMANDS* := { **show** | **list** | **dump** | **help** }
46
47	*GEN-COMMANDS* := { **object** | **skeleton** | **min_core_btf** | **help** }
48
49	*STRUCT-OPS-COMMANDS* := { **show** | **list** | **dump** | **register** | **unregister** | **help** }
50
51	*ITER-COMMANDS* := { **pin** | **help** }
52
53DESCRIPTION
54===========
55	*bpftool* allows for inspection and simple modification of BPF objects
56	on the system.
57
58	Note that format of the output of all tools is not guaranteed to be
59	stable and should not be depended upon.
60
61OPTIONS
62=======
63	.. include:: common_options.rst
64
65	-m, --mapcompat
66		  Allow loading maps with unknown map definitions.
67
68	-n, --nomount
69		  Do not automatically attempt to mount any virtual file system
70		  (such as tracefs or BPF virtual file system) when necessary.
71