]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
tools/cgget: add '-c' option
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 18 Apr 2023 08:20:48 +0000 (13:50 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Tue, 18 Apr 2023 14:10:15 +0000 (08:10 -0600)
commitfd173c8201a11a77103f166b61f1bf33187195d0
tree701663b691e5c6ace00b3b0ad50852d735fb59e1
parenta1299d6cd01fbff653a3fe919a67ea86483a054e
tools/cgget: add '-c' option

Add '-c' option to cgget, that prints the controllers and their
versions,
this is useful for the user, who wants to list the available controllers
and/or their version too.

 $ cgget -c
 #Controller     Version
 cpu             2
 memory          2
 cpuset          1
 misc            1
 hugetlb         1
 blkio           1
 net_cls         1
 net_prio        1
 freezer         1
 devices         1
 pids            1
 perf_event      1
 rdma            1

this option works with legacy, unified, and hybrid cgroup setup modes.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
TJH: Changed comment formatting
src/tools/cgget.c