Use /sys/fs/cgroup instead of /dev/cgroup
This commit is contained in:
parent
174d6a07e0
commit
2678ff3726
@ -37,14 +37,14 @@ in
|
|||||||
default =
|
default =
|
||||||
''
|
''
|
||||||
mount {
|
mount {
|
||||||
cpu = /dev/cgroup/cpu;
|
cpu = /sys/fs/cgroup/cpu;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
example =
|
example =
|
||||||
''
|
''
|
||||||
mount {
|
mount {
|
||||||
cpu = /dev/cgroup/cpu;
|
cpu = /sys/fs/cgroup/cpu;
|
||||||
cpuacct = /dev/cgroup/cpuacct;
|
cpuacct = /sys/fs/cgroup/cpuacct;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create a "www" cgroup with a lower share of the CPU (the
|
# Create a "www" cgroup with a lower share of the CPU (the
|
||||||
@ -105,10 +105,16 @@ in
|
|||||||
|
|
||||||
description = "Control groups daemon";
|
description = "Control groups daemon";
|
||||||
|
|
||||||
path = [ pkgs.libcgroup pkgs.procps ];
|
path = [ pkgs.libcgroup pkgs.procps pkgs.utillinux ];
|
||||||
|
|
||||||
preStart =
|
preStart =
|
||||||
''
|
''
|
||||||
|
if [ -d /sys/fs/cgroup ]; then
|
||||||
|
if ! mountpoint -q /sys/fs/cgroup; then
|
||||||
|
mount -t tmpfs -o mode=755 /dev/cgroup /sys/fs/cgroup
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
cgclear || true
|
cgclear || true
|
||||||
|
|
||||||
# Mount the cgroup hierarchies. Note: we refer to the
|
# Mount the cgroup hierarchies. Note: we refer to the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user