Messages in this thread | | | Date | Mon, 11 Sep 2023 08:55:50 -1000 | From | "" <> | 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
| |