lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZP9itivlZQIb5wZ0@mtj.duckdns.org>
Date:   Mon, 11 Sep 2023 08:55:50 -1000
From:   "tj@...nel.org" <tj@...nel.org>
To:     "Yakunin, Dmitry (Nebius)" <zeil@...ius.com>
Cc:     "cgroups@...r.kernel.org" <cgroups@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        NB-Core Team <NB-CoreTeam@...ius.com>,
        "hannes@...xchg.org" <hannes@...xchg.org>,
        "mhocko@...nel.org" <mhocko@...nel.org>,
        Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
        Andrey Ryabinin <arbn@...dex-team.com>
Subject: Re: [RFC PATCH 1/3] cgroup: list all subsystem states in debugfs
 files

On Mon, Sep 11, 2023 at 07:55:15AM +0000, Yakunin, Dmitry (Nebius) wrote:
> +static void mem_cgroup_css_dump(struct cgroup_subsys_state *css,
> +				struct seq_file *m)
> +{
> +	struct mem_cgroup *memcg = mem_cgroup_from_css(css);
> +
> +	seq_printf(m, "mem_id=%u memory=%lu memsw=%lu kmem=%lu tcpmem=%lu shmem=%lu",
> +		   mem_cgroup_id(memcg),
> +		   page_counter_read(&memcg->memory),
> +		   page_counter_read(&memcg->memsw),
> +		   page_counter_read(&memcg->kmem),
> +		   page_counter_read(&memcg->tcpmem),
> +		   memcg_page_state(memcg, NR_SHMEM));
> +}

Can you please take a look at drgn (https://github.com/osandov/drgn) and see
whether that satifies your needs? We can easily add drgn scripts under tools
directory too (e.g. iocost already does that).

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ