.. | .. |
---|
17 | 17 | *COMMANDS* := |
---|
18 | 18 | { **show** | **list** | **tree** | **attach** | **detach** | **help** } |
---|
19 | 19 | |
---|
20 | | -MAP COMMANDS |
---|
21 | | -============= |
---|
| 20 | +CGROUP COMMANDS |
---|
| 21 | +=============== |
---|
22 | 22 | |
---|
23 | | -| **bpftool** **cgroup { show | list }** *CGROUP* |
---|
24 | | -| **bpftool** **cgroup tree** [*CGROUP_ROOT*] |
---|
| 23 | +| **bpftool** **cgroup** { **show** | **list** } *CGROUP* [**effective**] |
---|
| 24 | +| **bpftool** **cgroup tree** [*CGROUP_ROOT*] [**effective**] |
---|
25 | 25 | | **bpftool** **cgroup attach** *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*] |
---|
26 | 26 | | **bpftool** **cgroup detach** *CGROUP* *ATTACH_TYPE* *PROG* |
---|
27 | 27 | | **bpftool** **cgroup help** |
---|
.. | .. |
---|
29 | 29 | | *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* } |
---|
30 | 30 | | *ATTACH_TYPE* := { **ingress** | **egress** | **sock_create** | **sock_ops** | **device** | |
---|
31 | 31 | | **bind4** | **bind6** | **post_bind4** | **post_bind6** | **connect4** | **connect6** | |
---|
32 | | -| **sendmsg4** | **sendmsg6** } |
---|
| 32 | +| **getpeername4** | **getpeername6** | **getsockname4** | **getsockname6** | **sendmsg4** | |
---|
| 33 | +| **sendmsg6** | **recvmsg4** | **recvmsg6** | **sysctl** | **getsockopt** | **setsockopt** | |
---|
| 34 | +| **sock_release** } |
---|
33 | 35 | | *ATTACH_FLAGS* := { **multi** | **override** } |
---|
34 | 36 | |
---|
35 | 37 | DESCRIPTION |
---|
36 | 38 | =========== |
---|
37 | | - **bpftool cgroup { show | list }** *CGROUP* |
---|
| 39 | + **bpftool cgroup { show | list }** *CGROUP* [**effective**] |
---|
38 | 40 | List all programs attached to the cgroup *CGROUP*. |
---|
39 | 41 | |
---|
40 | 42 | Output will start with program ID followed by attach type, |
---|
41 | 43 | attach flags and program name. |
---|
42 | 44 | |
---|
43 | | - **bpftool cgroup tree** [*CGROUP_ROOT*] |
---|
| 45 | + If **effective** is specified retrieve effective programs that |
---|
| 46 | + will execute for events within a cgroup. This includes |
---|
| 47 | + inherited along with attached ones. |
---|
| 48 | + |
---|
| 49 | + **bpftool cgroup tree** [*CGROUP_ROOT*] [**effective**] |
---|
44 | 50 | Iterate over all cgroups in *CGROUP_ROOT* and list all |
---|
45 | 51 | attached programs. If *CGROUP_ROOT* is not specified, |
---|
46 | 52 | bpftool uses cgroup v2 mountpoint. |
---|
.. | .. |
---|
48 | 54 | The output is similar to the output of cgroup show/list |
---|
49 | 55 | commands: it starts with absolute cgroup path, followed by |
---|
50 | 56 | program ID, attach type, attach flags and program name. |
---|
| 57 | + |
---|
| 58 | + If **effective** is specified retrieve effective programs that |
---|
| 59 | + will execute for events within a cgroup. This includes |
---|
| 60 | + inherited along with attached ones. |
---|
51 | 61 | |
---|
52 | 62 | **bpftool cgroup attach** *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*] |
---|
53 | 63 | Attach program *PROG* to the cgroup *CGROUP* with attach type |
---|
.. | .. |
---|
85 | 95 | **sendmsg4** call to sendto(2), sendmsg(2), sendmmsg(2) for an |
---|
86 | 96 | unconnected udp4 socket (since 4.18); |
---|
87 | 97 | **sendmsg6** call to sendto(2), sendmsg(2), sendmmsg(2) for an |
---|
88 | | - unconnected udp6 socket (since 4.18). |
---|
| 98 | + unconnected udp6 socket (since 4.18); |
---|
| 99 | + **recvmsg4** call to recvfrom(2), recvmsg(2), recvmmsg(2) for |
---|
| 100 | + an unconnected udp4 socket (since 5.2); |
---|
| 101 | + **recvmsg6** call to recvfrom(2), recvmsg(2), recvmmsg(2) for |
---|
| 102 | + an unconnected udp6 socket (since 5.2); |
---|
| 103 | + **sysctl** sysctl access (since 5.2); |
---|
| 104 | + **getsockopt** call to getsockopt (since 5.3); |
---|
| 105 | + **setsockopt** call to setsockopt (since 5.3); |
---|
| 106 | + **getpeername4** call to getpeername(2) for an inet4 socket (since 5.8); |
---|
| 107 | + **getpeername6** call to getpeername(2) for an inet6 socket (since 5.8); |
---|
| 108 | + **getsockname4** call to getsockname(2) for an inet4 socket (since 5.8); |
---|
| 109 | + **getsockname6** call to getsockname(2) for an inet6 socket (since 5.8). |
---|
| 110 | + **sock_release** closing an userspace inet socket (since 5.9). |
---|
89 | 111 | |
---|
90 | 112 | **bpftool cgroup detach** *CGROUP* *ATTACH_TYPE* *PROG* |
---|
91 | 113 | Detach *PROG* from the cgroup *CGROUP* and attach type |
---|
.. | .. |
---|
96 | 118 | |
---|
97 | 119 | OPTIONS |
---|
98 | 120 | ======= |
---|
99 | | - -h, --help |
---|
100 | | - Print short generic help message (similar to **bpftool help**). |
---|
101 | | - |
---|
102 | | - -v, --version |
---|
103 | | - Print version number (similar to **bpftool version**). |
---|
104 | | - |
---|
105 | | - -j, --json |
---|
106 | | - Generate JSON output. For commands that cannot produce JSON, this |
---|
107 | | - option has no effect. |
---|
108 | | - |
---|
109 | | - -p, --pretty |
---|
110 | | - Generate human-readable JSON output. Implies **-j**. |
---|
| 121 | + .. include:: common_options.rst |
---|
111 | 122 | |
---|
112 | 123 | -f, --bpffs |
---|
113 | 124 | Show file names of pinned programs. |
---|
.. | .. |
---|
134 | 145 | :: |
---|
135 | 146 | |
---|
136 | 147 | ID AttachType AttachFlags Name |
---|
137 | | - |
---|
138 | | -SEE ALSO |
---|
139 | | -======== |
---|
140 | | - **bpftool**\ (8), **bpftool-prog**\ (8), **bpftool-map**\ (8) |
---|