]> 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:14:14 +0000 (08:14 -0600)
commit67a0c815b4aff2da9e996786d57f4ab6448ff267
tree2a76bf27bca5e5118259f668549c1bcfe4170fe2
parent480176e2f27ae2e0b0b9c7e0afa8872e82c60a61
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
(cherry picked from commit fd173c8201a11a77103f166b61f1bf33187195d0)
src/tools/cgget.c