lkml.org 
[lkml]   [2023]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2023-09-12 00:10    [W:0.058 / U:4.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site