1============ 2bpftool-iter 3============ 4------------------------------------------------------------------------------- 5tool to create BPF iterators 6------------------------------------------------------------------------------- 7 8:Manual section: 8 9 10SYNOPSIS 11======== 12 13 **bpftool** [*OPTIONS*] **iter** *COMMAND* 14 15 *COMMANDS* := { **pin** | **help** } 16 17ITER COMMANDS 18=================== 19 20| **bpftool** **iter pin** *OBJ* *PATH* 21| **bpftool** **iter help** 22| 23| *OBJ* := /a/file/of/bpf_iter_target.o 24 25DESCRIPTION 26=========== 27 **bpftool iter pin** *OBJ* *PATH* 28 A bpf iterator combines a kernel iterating of 29 particular kernel data (e.g., tasks, bpf_maps, etc.) 30 and a bpf program called for each kernel data object 31 (e.g., one task, one bpf_map, etc.). User space can 32 *read* kernel iterator output through *read()* syscall. 33 34 The *pin* command creates a bpf iterator from *OBJ*, 35 and pin it to *PATH*. The *PATH* should be located 36 in *bpffs* mount. It must not contain a dot 37 character ('.'), which is reserved for future extensions 38 of *bpffs*. 39 40 User can then *cat PATH* to see the bpf iterator output. 41 42 **bpftool iter help** 43 Print short help message. 44 45OPTIONS 46======= 47 -h, --help 48 Print short generic help message (similar to **bpftool help**). 49 50 -V, --version 51 Print version number (similar to **bpftool version**). 52 53 -d, --debug 54 Print all logs available, even debug-level information. This 55 includes logs from libbpf as well as from the verifier, when 56 attempting to load programs. 57 58EXAMPLES 59======== 60**# bpftool iter pin bpf_iter_netlink.o /sys/fs/bpf/my_netlink** 61 62:: 63 64 Create a file-based bpf iterator from bpf_iter_netlink.o and pin it 65 to /sys/fs/bpf/my_netlink 66 67SEE ALSO 68======== 69 **bpf**\ (2), 70 **bpf-helpers**\ (7), 71 **bpftool**\ (8), 72 **bpftool-btf**\ (8), 73 **bpftool-cgroup**\ (8), 74 **bpftool-feature**\ (8), 75 **bpftool-gen**\ (8), 76 **bpftool-link**\ (8), 77 **bpftool-map**\ (8), 78 **bpftool-net**\ (8), 79 **bpftool-perf**\ (8), 80 **bpftool-prog**\ (8), 81 **bpftool-struct_ops**\ (8) 82