1BPFTOOL-FEATURE(8)                                          BPFTOOL-FEATURE(8)
2
3
4

NAME

6       bpftool-feature  -  tool  for inspection of eBPF-related parameters for
7       Linux kernel or net device
8

SYNOPSIS

10          bpftool [OPTIONS] feature COMMAND
11
12          OPTIONS := { { -j | --json } [{ -p | --pretty }] }
13
14          COMMANDS := { probe | help }
15

FEATURE COMMANDS

17       bpftool feature probe [COMPONENT] [full] [unprivileged] [macros [prefix PREFIX]]
18       bpftool feature help
19
20       COMPONENT := { kernel | dev NAME }
21
22

DESCRIPTION

24          bpftool feature probe [kernel] [full] [macros [prefix PREFIX]]
25                 Probe the running kernel and dump a  number  of  eBPF-related
26                 parameters,  such  as  availability of the bpf() system call,
27                 JIT status, eBPF  program  types  availability,  eBPF  helper
28                 functions availability, and more.
29
30                 By    default,    bpftool    does    not   run   probes   for
31                 bpf_probe_write_user() and bpf_trace_printk()  helpers  which
32                 print  warnings  to  kernel  logs. To enable them and run all
33                 probes, the full keyword should be used.
34
35                 If the macros keyword (but not the -j option)  is  passed,  a
36                 subset  of  the  output is dumped as a list of #define macros
37                 that are ready to be included in a C header file,  for  exam‐
38                 ple. If, additionally, prefix is used to define a PREFIX, the
39                 provided string will be used as a prefix to the names of  the
40                 macros:  this  can  be used to avoid conflicts on macro names
41                 when including the output of this command as a header file.
42
43                 Keyword kernel can be omitted. If no probe target  is  speci‐
44                 fied, probing the kernel is the default behaviour.
45
46                 When the unprivileged keyword is used, bpftool will dump only
47                 the features available to  a  user  who  does  not  have  the
48                 CAP_SYS_ADMIN  capability set. The features available in that
49                 case usually represent a small subset of the parameters  sup‐
50                 ported by the system. Unprivileged users MUST use the unpriv‐
51                 ileged keyword: This is to avoid misdetection if  bpftool  is
52                 inadvertently  run  as non-root, for example. This keyword is
53                 unavailable if bpftool was compiled without libcap.
54
55          bpftool feature probe dev NAME [full] [macros [prefix PREFIX]]
56                 Probe network device for supported  eBPF  features  and  dump
57                 results to the console.
58
59                 The  keywords  full,  macros and prefix have the same role as
60                 when probing the kernel.
61
62          bpftool feature help
63                 Print short help message.
64

OPTIONS

66          -h, --help
67                 Print short help message (similar to bpftool help).
68
69          -V, --version
70                 Print  version  number  (similar  to  bpftool  version),  and
71                 optional  features  that  were included when bpftool was com‐
72                 piled. Optional features include linking  against  libbfd  to
73                 provide  the  disassembler for JIT-ted programs (bpftool prog
74                 dump jited) and usage of BPF skeletons  (some  features  like
75                 bpftool  prog  profile  or  showing  pids  associated  to BPF
76                 objects may rely on it).
77
78          -j, --json
79                 Generate JSON output. For commands that cannot produce  JSON,
80                 this option has no effect.
81
82          -p, --pretty
83                 Generate human-readable JSON output. Implies -j.
84
85          -d, --debug
86                 Print  all logs available, even debug-level information. This
87                 includes logs from libbpf as well as from the verifier,  when
88                 attempting to load programs.
89

SEE ALSO

91          bpf(2),       bpf-helpers(7),       bpftool(8),      bpftool-btf(8),
92          bpftool-cgroup(8), bpftool-gen(8), bpftool-iter(8), bpftool-link(8),
93          bpftool-map(8),  bpftool-net(8),  bpftool-perf(8),  bpftool-prog(8),
94          bpftool-struct_ops(8)
95
96
97
98
99                                                            BPFTOOL-FEATURE(8)
Impressum