From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH v2 bpf-next 1/3] bpftool: introduce cgroup tree command Date: Fri, 6 Jul 2018 14:01:14 -0700 Message-ID: <20180706140114.2f74ff26@cakuba.netronome.com> References: <20180706183012.6475-1-guro@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: , , , Quentin Monnet , Daniel Borkmann , Alexei Starovoitov To: Roman Gushchin Return-path: Received: from mail-qk0-f193.google.com ([209.85.220.193]:39649 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934035AbeGFVBS (ORCPT ); Fri, 6 Jul 2018 17:01:18 -0400 Received: by mail-qk0-f193.google.com with SMTP id b5-v6so4999019qkg.6 for ; Fri, 06 Jul 2018 14:01:18 -0700 (PDT) In-Reply-To: <20180706183012.6475-1-guro@fb.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, 6 Jul 2018 11:30:10 -0700, Roman Gushchin wrote: > This commit introduces a new bpftool command: cgroup tree. > The idea is to iterate over the whole cgroup tree and print > all attached programs. > > I was debugging a bpf/systemd issue, and found, that there is > no simple way to listen all bpf programs attached to cgroups. > I did master something in bash, but after some time got tired of it, > and decided, that adding a dedicated bpftool command could be > a better idea. > > So, here it is: > $ sudo ./bpftool cgroup tree > CgroupPath > ID AttachType AttachFlags Name > /sys/fs/cgroup/system.slice/systemd-machined.service > 18 ingress > 17 egress > /sys/fs/cgroup/system.slice/systemd-logind.service > 20 ingress > 19 egress > /sys/fs/cgroup/system.slice/systemd-udevd.service > 16 ingress > 15 egress > /sys/fs/cgroup/system.slice/systemd-journald.service > 14 ingress > 13 egress > > Signed-off-by: Roman Gushchin > Cc: Jakub Kicinski > Cc: Quentin Monnet > Cc: Daniel Borkmann > Cc: Alexei Starovoitov Acked-by: Jakub Kicinski