1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# rpm -ql libcgroup-tools ... /usr/bin/cgclassify /usr/bin/cgcreate /usr/bin/cgdelete /usr/bin/cgexec /usr/bin/cgget /usr/bin/cgset /usr/bin/cgsnapshot /usr/bin/lscgroup /usr/bin/lssubsys /usr/lib/systemd/system/cgconfig.service /usr/lib/systemd/system/cgred.service /usr/sbin/cgclear /usr/sbin/cgconfigparser /usr/sbin/cgrulesengd ... |
1 2 3 4 5 6 7 8 9 10 |
# lscgroup memory:/ memory:/ memory:/machine.slice memory:/machine.slice/machine-qemu\x2d14\x2dinstance\x2d00000012.scope memory:/machine.slice/machine-qemu\x2d16\x2dinstance\x2d00000014.scope memory:/machine.slice/machine-qemu\x2d9\x2dinstance\x2d00000009.scope memory:/machine.slice/machine-qemu\x2d6\x2dinstance\x2d00000008.scope memory:/machine.slice/machine-qemu\x2d15\x2dinstance\x2d00000013.scope memory:/system.slice memory:/user.slice |
lscgroup: 列出各cgroup及其挂载点; qemu 也是通过cgroup进行资源限制的
cgsnapshot 可以列出当前各cgroup子系统的配置信息
lssubsys 列出各子系统及其挂载点
1 2 3 4 5 6 7 8 9 10 11 |
# lssubsys -M cpuset /sys/fs/cgroup/cpuset cpu,cpuacct /sys/fs/cgroup/cpu,cpuacct blkio /sys/fs/cgroup/blkio memory /sys/fs/cgroup/memory devices /sys/fs/cgroup/devices freezer /sys/fs/cgroup/freezer net_cls,net_prio /sys/fs/cgroup/net_cls,net_prio perf_event /sys/fs/cgroup/perf_event hugetlb /sys/fs/cgroup/hugetlb pids /sys/fs/cgroup/pids |