.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "BPFTOOL-FEATURE" "8" "" "" .SH NAME bpftool-feature \- tool for inspection of eBPF-related parameters for Linux kernel or net device .SH SYNOPSIS .sp \fBbpftool\fP [\fIOPTIONS\fP] \fBfeature\fP \fICOMMAND\fP .sp \fIOPTIONS\fP := { { \fB\-j\fP | \fB\-\-json\fP } [{ \fB\-p\fP | \fB\-\-pretty\fP }] | { \fB\-d\fP | \fB\-\-debug\fP } } .sp \fICOMMANDS\fP := { \fBprobe\fP | \fBhelp\fP } .SH FEATURE COMMANDS .nf \fBbpftool\fP \fBfeature probe\fP [\fICOMPONENT\fP] [\fBfull\fP] [\fBunprivileged\fP] [\fBmacros\fP [\fBprefix\fP \fIPREFIX\fP]] \fBbpftool\fP \fBfeature list_builtins\fP \fIGROUP\fP \fBbpftool\fP \fBfeature help\fP \fICOMPONENT\fP := { \fBkernel\fP | \fBdev\fP \fINAME\fP } \fIGROUP\fP := { \fBprog_types\fP | \fBmap_types\fP | \fBattach_types\fP | \fBlink_types\fP | \fBhelpers\fP } .fi .sp .SH DESCRIPTION .INDENT 0.0 .TP .B bpftool feature probe [kernel] [full] [macros [prefix \fIPREFIX\fP]] Probe the running kernel and dump a number of eBPF\-related parameters, such as availability of the \fBbpf\fP() system call, JIT status, eBPF program types availability, eBPF helper functions availability, and more. .sp By default, bpftool \fBdoes not run probes\fP for \fBbpf_probe_write_user\fP() and \fBbpf_trace_printk\fP() helpers which print warnings to kernel logs. To enable them and run all probes, the \fBfull\fP keyword should be used. .sp If the \fBmacros\fP keyword (but not the \fB\-j\fP option) is passed, a subset of the output is dumped as a list of \fB#define\fP macros that are ready to be included in a C header file, for example. If, additionally, \fBprefix\fP is used to define a \fIPREFIX\fP, the provided string will be used as a prefix to the names of the macros: this can be used to avoid conflicts on macro names when including the output of this command as a header file. .sp Keyword \fBkernel\fP can be omitted. If no probe target is specified, probing the kernel is the default behaviour. .sp When the \fBunprivileged\fP keyword is used, bpftool will dump only the features available to a user who does not have the \fBCAP_SYS_ADMIN\fP capability set. The features available in that case usually represent a small subset of the parameters supported by the system. Unprivileged users MUST use the \fBunprivileged\fP keyword: This is to avoid misdetection if bpftool is inadvertently run as non\-root, for example. This keyword is unavailable if bpftool was compiled without libcap. .TP .B bpftool feature probe dev \fINAME\fP [full] [macros [prefix \fIPREFIX\fP]] Probe network device for supported eBPF features and dump results to the console. .sp The keywords \fBfull\fP, \fBmacros\fP and \fBprefix\fP have the same role as when probing the kernel. .TP .B bpftool feature list_builtins \fIGROUP\fP List items known to bpftool. These can be BPF program types (\fBprog_types\fP), BPF map types (\fBmap_types\fP), attach types (\fBattach_types\fP), link types (\fBlink_types\fP), or BPF helper functions (\fBhelpers\fP). The command does not probe the system, but simply lists the elements that bpftool knows from compilation time, as provided from libbpf (for all object types) or from the BPF UAPI header (list of helpers). This can be used in scripts to iterate over BPF types or helpers. .TP .B bpftool feature help Print short help message. .UNINDENT .SH OPTIONS .INDENT 0.0 .TP .B \-h\fP,\fB \-\-help Print short help message (similar to \fBbpftool help\fP). .TP .B \-V\fP,\fB \-\-version Print bpftool\(aqs version number (similar to \fBbpftool version\fP), the number of the libbpf version in use, and optional features that were included when bpftool was compiled. Optional features include linking against LLVM or libbfd to provide the disassembler for JIT\-ted programs (\fBbpftool prog dump jited\fP) and usage of BPF skeletons (some features like \fBbpftool prog profile\fP or showing pids associated to BPF objects may rely on it). .TP .B \-j\fP,\fB \-\-json Generate JSON output. For commands that cannot produce JSON, this option has no effect. .TP .B \-p\fP,\fB \-\-pretty Generate human\-readable JSON output. Implies \fB\-j\fP\&. .TP .B \-d\fP,\fB \-\-debug Print all logs available, even debug\-level information. This includes logs from libbpf as well as from the verifier, when attempting to load programs. .UNINDENT .SH SEE ALSO .sp \fBbpf\fP(2), \fBbpf\-helpers\fP(7), \fBbpftool\fP(8), \fBbpftool\-btf\fP(8), \fBbpftool\-cgroup\fP(8), \fBbpftool\-gen\fP(8), \fBbpftool\-iter\fP(8), \fBbpftool\-link\fP(8), \fBbpftool\-map\fP(8), \fBbpftool\-net\fP(8), \fBbpftool\-perf\fP(8), \fBbpftool\-prog\fP(8), \fBbpftool\-struct_ops\fP(8) .\" Generated by docutils manpage writer. .