系统: Ubuntu 18.04.2 LTS 内核版本: 4.15.0-50-generic 在**/sys/fs/cgroup/memory建了一个目录 my-test,然后想设置内存限额,写文件sh -c "echo 1M > memory.limit_in_bytes"**,发生错误
sh: echo: I/O error
my-test 目录列表
ls -al
总用量 0
drwxr-xr-x 2 root root 0 7 月 4 12:31 .
dr-xr-xr-x 6 root root 0 7 月 4 12:31 ..
-rw-r--r-- 1 root root 0 7 月 4 12:31 cgroup.clone_children
--w--w--w- 1 root root 0 7 月 4 12:31 cgroup.event_control
-rw-r--r-- 1 root root 0 7 月 4 12:31 cgroup.procs
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.failcnt
--w------- 1 root root 0 7 月 4 12:31 memory.force_empty
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.kmem.failcnt
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.kmem.limit_in_bytes
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.kmem.max_usage_in_bytes
-r--r--r-- 1 root root 0 7 月 4 12:31 memory.kmem.slabinfo
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.kmem.tcp.failcnt
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.kmem.tcp.limit_in_bytes
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.kmem.tcp.max_usage_in_bytes
-r--r--r-- 1 root root 0 7 月 4 12:31 memory.kmem.tcp.usage_in_bytes
-r--r--r-- 1 root root 0 7 月 4 12:31 memory.kmem.usage_in_bytes
-rw-r--r-- 1 root root 0 7 月 4 12:38 memory.limit_in_bytes
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.max_usage_in_bytes
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.move_charge_at_immigrate
-r--r--r-- 1 root root 0 7 月 4 12:31 memory.numa_stat
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.oom_control
---------- 1 root root 0 7 月 4 12:31 memory.pressure_level
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.soft_limit_in_bytes
-r--r--r-- 1 root root 0 7 月 4 12:31 memory.stat
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.swappiness
-r--r--r-- 1 root root 0 7 月 4 12:31 memory.usage_in_bytes
-rw-r--r-- 1 root root 0 7 月 4 12:31 memory.use_hierarchy
-rw-r--r-- 1 root root 0 7 月 4 12:31 notify_on_release
-rw-r--r-- 1 root root 0 7 月 4 12:31 tasks