]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
unify lssubsys output
authorIvana Hutarova Varekova <varekova@redhat.com>
Wed, 20 Apr 2011 13:41:55 +0000 (15:41 +0200)
committerJan Safranek <jsafrane@redhat.com>
Tue, 26 Apr 2011 06:48:57 +0000 (08:48 +0200)
commit97acaae4bc86b99707fa9dd7752a6fdb0f0954d7
treea0519a020e9b49e4aa2862af622ac75a5ca3609b
parenta3605a5aa78ced098f174be9159eb7a4cf1dc1c3
unify lssubsys output

fix several problems in lssubsys output
 * not consistent output with and without -i option
 * without this option lssubsys ignore multiple hierarchies on one mount
point
 * lssubsys -i without -a does not show the hierarchy number

in configuration:
$ cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpuset 609 1 1
ns 0 1 1
cpu 606 1 1
cpuacct 606 1 1
memory 0 1 1
devices 0 1 1
freezer 612 1 1
net_cls 0 1 1
blkio 0 1 1

Old output:
$ lssubsys
cpu,cpuacct
cpuset,freezer
$ ./lssubsys -i
cpu,cpuacct
cpuset,freezer
$ ./lssubsys -ia
ns
memory
devices
net_cls
blkio
cpuset 609
cpu,cpuacct 606
freezer 612

new one:
$lssubsys
cpuset
cpu,cpuacct
freezer
$ ./lssubsys -i
cpuset 609
cpu,cpuacct 606
freezer 612
$ ./lssubsys -a
ns
memory
devices
net_cls
blkio
cpuset
cpu,cpuacct
freezer

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
src/tools/lssubsys.c