Cgroup
1. 基本操作
mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd mount -t cgroup -o devices cgroup /sys/fs/cgroup/devices mount -t cgroup -o memory cgroup /sys/fs/cgroup/memory mount -t cgroup -o cpuset cgroup /sys/fs/cgroup/cpuset mount -t cgroup -o freezer cgroup /sys/fs/cgroup/freezer mount -t cgroup -o net_cls cgroup /sys/fs/cgroup/net_cls mount -t cgroup -o blkio cgroup /sys/fs/cgroup/blkio mount -t cgroup -o cpu,cpuacct cgroup /sys/fs/cgroup/cpu,cpuacctAttaching processes ----------------------- # /bin/echo PID > tasks Note that it is PID, not PIDs. You can only attach ONE task at a time. If you have several tasks to attach, you have to do it one after another: # /bin/echo PID1 > tasks # /bin/echo PID2 > tasks ... # /bin/echo PIDn > tasks
参考资料
Last updated