あなた自身のトップレベルのcgroupを作成できますか?

あなた自身のトップレベルのcgroupを作成できますか?

文書これがうまくいくべきことを示すようです

# mkdir /sys/fs/cgroup/mytest
# mount -t cgroup mytest  /sys/fs/cgroup/mytest
mount: /sys/fs/cgroup/mytest: mytest already mounted or mount point busy.

私は何を見逃していますか?

これはcentos-8のcgroups-v1です。

ベストアンサー1

次のようなものをお探しですか? (異なるLinuxバージョンを使用しているため、パスは例と異なる場合があります。)

Create the cgroup
# mkdir /sys/fs/cgroup/unified/mytest

Put the shell in the cgroup
# echo $$ > /sys/fs/cgroup/unified/mytest/cgroup.procs

Verify that the shell process is in the given cgroup
# cat /proc/$$/cgroup | grep mytest
0::/mytest

おすすめ記事