Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp63653imm; Fri, 6 Jul 2018 14:04:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdVgNcScrF1tYS9AlWHAPapcEsow8Ow6mesMKkKS58r96SmA+u0DG+Bn5QH1rPYu8nVVwov X-Received: by 2002:a63:5a13:: with SMTP id o19-v6mr10584435pgb.195.1530911055670; Fri, 06 Jul 2018 14:04:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530911055; cv=none; d=google.com; s=arc-20160816; b=c4IFWFBjyN4oxaVlvp/5ERJFX3tVUovWlV2cYTC7MImz6kO8XX5R9UdD5ELxNwge0Q PBhXI9bEGQwfuRU+SWpqA899kohaYLgr0Nmk2XXJIEadOO34oHaSrf2mh3+9HhepItdo mQmPki4uUAnCQ/rCTh4XF+kcf0moQfYEYlgjPOuDWvtS++tqLgneq+33DwQFP6m6gmbd rgntHPEsYQBF0+DxcBPf7Aua/u6U/4HwejmHgKkCsqqt4e5s7PZrUZsTqm2dPOsW8A7g pMUqtUybb+tF41cq/yErQcEsjq28MdsNU8an202mjLPMNJ1gLaItU4v2ZI7AguY75y8x n1bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature:arc-authentication-results; bh=g+89KdBFybMmaBX5zLpQi8xdiV1/vtpHgjUiDssHV7Y=; b=aFy3iZDtLm8gjG9VmKC7XTy/Ga/B67c+3SsON6joo5jHW+56DHrQZEQYcSEr8PXRqY Ce6puHMg5CSkKUCx9J2iQDDDRt7uokupYDt9qLu1DAV2tWZUWemS0HyxTUuZ0VY5XeiE x6u4E7nwe3HeA1QfIu5lsaGGBkYgCUJDN0BVCQqgKftTLRwfqO1G470xbes4/RTc5R7x BrO5e6QqJpS1/KAv0ibwr9FTx2qzDzrcedPas2zeDUoCQvPPNhWFFk03SCd5+yWPJXtZ mCRQviEzVRO9Bo6AguIwT8yh9WQC4uDs/dTStn7Pw5+746sGMYP/tlvqhJV1NXuZs5z0 N0fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b="zivX/Vtd"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s126-v6si9607561pfc.222.2018.07.06.14.03.54; Fri, 06 Jul 2018 14:04:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b="zivX/Vtd"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934382AbeGFVBU (ORCPT + 99 others); Fri, 6 Jul 2018 17:01:20 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:40184 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933982AbeGFVBS (ORCPT ); Fri, 6 Jul 2018 17:01:18 -0400 Received: by mail-qk0-f195.google.com with SMTP id b129-v6so6998069qke.7 for ; Fri, 06 Jul 2018 14:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=g+89KdBFybMmaBX5zLpQi8xdiV1/vtpHgjUiDssHV7Y=; b=zivX/VtdH+h6mqycw8ao4K17J5GBdDXKIq/nia1kBF/rYVlCOI77+i9LJRf3BRQLyQ hOJkZs8tAw6QdfODgNHclbaj5OTCo7c6XV6s77OIMIb5Ou6/twyGn5jtko9oboxMFR8k BGCLxJamdG4KnaHVM+3LyplfsAXG/6uzZ+EmWuCmZiggzqaMFPKXMZUbx/+GLMD30Bpr Dn5tvTeYa3uTUM7bYq4Xl3CNnvkzmT1IccV754a42KIiRFwDh9oc7VYCQ34dKiuJm5gS rNSbq/DKx6CFMxCVYE28SeeyBJi9Fnpvo3mY7ynP2gjssHBZE1Q7dReqks4slIeeOGkz tLcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=g+89KdBFybMmaBX5zLpQi8xdiV1/vtpHgjUiDssHV7Y=; b=RYGnkHPfJZMRJCN/HJRo5EHm2IoW6TJ6qxCgvHsXZ5Bniyrec+pGNA0cubmdpGJTN4 gcXRPtKrfmmFozG3Q51LLF6UHn0VNXVXfddGuzRmLrW/PWdojiW1BwJJawDVPkAEk5Mm RKHkV13S/HkSGOMEKo2cFxPYQ1jvI1w1GedsfGzMjWVcN7DfcVJOhW8pDQNoI66x8qg7 fyrC0k4LV4f44CcIKN7j+iR4UE+jr4NpBypF6GODJ//OGGFndmDV8iPXFYlqLh2rLPzX ujlB8t7SZh3iOaNU3egyHLzigMujhdS6oLcqxWDECoFRU5soqGrqxXvYNlsdn/GZ/FwS JTJQ== X-Gm-Message-State: APt69E0I5bA0d1noYwirbsRxMYm4whD787J0sw6MkNZZWlXVkhCUA/nb AI3LEr2s2VMNukTrvu2BgdqGDw== X-Received: by 2002:a37:6142:: with SMTP id v63-v6mr10259942qkb.418.1530910877642; Fri, 06 Jul 2018 14:01:17 -0700 (PDT) Received: from cakuba.netronome.com ([75.53.12.129]) by smtp.gmail.com with ESMTPSA id y187-v6sm5871128qkd.32.2018.07.06.14.01.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jul 2018 14:01:17 -0700 (PDT) Date: Fri, 6 Jul 2018 14:01:14 -0700 From: Jakub Kicinski To: Roman Gushchin Cc: , , , Quentin Monnet , Daniel Borkmann , Alexei Starovoitov Subject: Re: [PATCH v2 bpf-next 1/3] bpftool: introduce cgroup tree command Message-ID: <20180706140114.2f74ff26@cakuba.netronome.com> In-Reply-To: <20180706183012.6475-1-guro@fb.com> References: <20180706183012.6475-1-guro@fb.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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