Updating cgroup directory
Last-Update: 2014-07-26 Gbp-Pq: Name cgroup-directory.patch
This commit is contained in:
parent
d510ea5c1f
commit
b2fee3516c
2
README
2
README
|
@ -16,7 +16,7 @@ this file will be managed by root.
|
||||||
Basic idea is that to begin with provide facility to implement rules
|
Basic idea is that to begin with provide facility to implement rules
|
||||||
based on uid and gid. So a hierarchy might look like as follows.
|
based on uid and gid. So a hierarchy might look like as follows.
|
||||||
|
|
||||||
/mnt/cgroup
|
/sys/fs/cgroup
|
||||||
| |
|
| |
|
||||||
gid1 gid2
|
gid1 gid2
|
||||||
| |
|
| |
|
||||||
|
|
|
@ -262,8 +262,8 @@ The configuration file:
|
||||||
.nf
|
.nf
|
||||||
mount {
|
mount {
|
||||||
.RS
|
.RS
|
||||||
cpu = /mnt/cgroups/cpu;
|
cpu = /sys/fs/cgroup/cpu;
|
||||||
cpuacct = /mnt/cgroups/cpu;
|
cpuacct = /sys/fs/cgroup/cpu;
|
||||||
.RE
|
.RE
|
||||||
}
|
}
|
||||||
.fi
|
.fi
|
||||||
|
@ -274,8 +274,8 @@ inside. It corresponds to the following operations:
|
||||||
.LP
|
.LP
|
||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
mkdir /mnt/cgroups/cpu
|
mkdir /sys/fs/cgroup/cpu
|
||||||
mount -t cgroup -o cpu,cpuacct cpu /mnt/cgroups/cpu
|
mount -t cgroup -o cpu,cpuacct cpu /sys/fs/cgroup/cpu
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
@ -287,9 +287,9 @@ The configuration file:
|
||||||
.nf
|
.nf
|
||||||
mount {
|
mount {
|
||||||
.RS
|
.RS
|
||||||
cpu = /mnt/cgroups/cpu;
|
cpu = /sys/fs/cgroup/cpu;
|
||||||
"name=scheduler" = /mnt/cgroups/cpu;
|
"name=scheduler" = /sys/fs/cgroup/cpu;
|
||||||
"name=noctrl" = /mnt/cgroups/noctrl;
|
"name=noctrl" = /sys/fs/cgroup/noctrl;
|
||||||
.RE
|
.RE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,14 +317,14 @@ following operations:
|
||||||
.LP
|
.LP
|
||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
mkdir /mnt/cgroups/cpu
|
mkdir /sys/fs/cgroup/cpu
|
||||||
mount -t cgroup -o cpu,name=scheduler cpu /mnt/cgroups/cpu
|
mount -t cgroup -o cpu,name=scheduler cpu /sys/fs/cgroup/cpu
|
||||||
mount -t cgroup -o none,name=noctrl none /mnt/cgroups/noctrl
|
mount -t cgroup -o none,name=noctrl none /sys/fs/cgroup/noctrl
|
||||||
|
|
||||||
mkdir /mnt/cgroups/cpu/daemons
|
mkdir /sys/fs/cgroup/cpu/daemons
|
||||||
echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
|
echo 1000 > /sys/fs/cgroup/cpu/daemons/www/cpu.shares
|
||||||
|
|
||||||
mkdir /mnt/cgroups/noctrl/tests
|
mkdir /sys/fs/cgroup/noctrl/tests
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
@ -354,8 +354,8 @@ The configuration file:
|
||||||
.nf
|
.nf
|
||||||
mount {
|
mount {
|
||||||
.RS
|
.RS
|
||||||
cpu = /mnt/cgroups/cpu;
|
cpu = /sys/fs/cgroup/cpu;
|
||||||
cpuacct = /mnt/cgroups/cpu;
|
cpuacct = /sys/fs/cgroup/cpu;
|
||||||
.RE
|
.RE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,18 +426,18 @@ which are little bit trickier to emulate via chmod):
|
||||||
.LP
|
.LP
|
||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
mkdir /mnt/cgroups/cpu
|
mkdir /sys/fs/cgroup/cpu
|
||||||
mount -t cgroup -o cpu,cpuacct cpu /mnt/cgroups/cpu
|
mount -t cgroup -o cpu,cpuacct cpu /sys/fs/cgroup/cpu
|
||||||
|
|
||||||
mkdir /mnt/cgroups/cpu/daemons
|
mkdir /sys/fs/cgroup/cpu/daemons
|
||||||
|
|
||||||
mkdir /mnt/cgroups/cpu/daemons/www
|
mkdir /sys/fs/cgroup/cpu/daemons/www
|
||||||
chown root:root /mnt/cgroups/cpu/daemons/www/*
|
chown root:root /sys/fs/cgroup/cpu/daemons/www/*
|
||||||
chown root:webmaster /mnt/cgroups/cpu/daemons/www/tasks
|
chown root:webmaster /sys/fs/cgroup/cpu/daemons/www/tasks
|
||||||
echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
|
echo 1000 > /sys/fs/cgroup/cpu/daemons/www/cpu.shares
|
||||||
|
|
||||||
# + chmod the files so the result looks like:
|
# + chmod the files so the result looks like:
|
||||||
# ls -la /mnt/cgroups/cpu/daemons/www/
|
# ls -la /sys/fs/cgroup/cpu/daemons/www/
|
||||||
# admin.dperm = 755:
|
# admin.dperm = 755:
|
||||||
# drwxr-xr-x. 2 root webmaster 0 Jun 16 11:51 .
|
# drwxr-xr-x. 2 root webmaster 0 Jun 16 11:51 .
|
||||||
#
|
#
|
||||||
|
@ -456,13 +456,13 @@ echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
|
||||||
# -rw-rw----. 1 root webmaster 0 Jun 16 11:51 tasks
|
# -rw-rw----. 1 root webmaster 0 Jun 16 11:51 tasks
|
||||||
|
|
||||||
|
|
||||||
mkdir /mnt/cgroups/cpu/daemons/ftp
|
mkdir /sys/fs/cgroup/cpu/daemons/ftp
|
||||||
chown root:root /mnt/cgroups/cpu/daemons/ftp/*
|
chown root:root /sys/fs/cgroup/cpu/daemons/ftp/*
|
||||||
chown root:ftpmaster /mnt/cgroups/cpu/daemons/ftp/tasks
|
chown root:ftpmaster /sys/fs/cgroup/cpu/daemons/ftp/tasks
|
||||||
echo 500 > /mnt/cgroups/cpu/daemons/ftp/cpu.shares
|
echo 500 > /sys/fs/cgroup/cpu/daemons/ftp/cpu.shares
|
||||||
|
|
||||||
# + chmod the files so the result looks like:
|
# + chmod the files so the result looks like:
|
||||||
# ls -la /mnt/cgroups/cpu/daemons/ftp/
|
# ls -la /sys/fs/cgroup/cpu/daemons/ftp/
|
||||||
# admin.dperm = 755:
|
# admin.dperm = 755:
|
||||||
# drwxr-xr-x. 2 root ftpmaster 0 Jun 16 11:51 .
|
# drwxr-xr-x. 2 root ftpmaster 0 Jun 16 11:51 .
|
||||||
#
|
#
|
||||||
|
@ -510,8 +510,8 @@ The configuration file:
|
||||||
.nf
|
.nf
|
||||||
mount {
|
mount {
|
||||||
.RS
|
.RS
|
||||||
cpu = /mnt/cgroups/cpu;
|
cpu = /sys/fs/cgroup/cpu;
|
||||||
cpuacct = /mnt/cgroups/cpuacct;
|
cpuacct = /sys/fs/cgroup/cpuacct;
|
||||||
.RE
|
.RE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -530,13 +530,13 @@ It corresponds to the following operations:
|
||||||
.LP
|
.LP
|
||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
mkdir /mnt/cgroups/cpu
|
mkdir /sys/fs/cgroup/cpu
|
||||||
mkdir /mnt/cgroups/cpuacct
|
mkdir /sys/fs/cgroup/cpuacct
|
||||||
mount -t cgroup -o cpu cpu /mnt/cgroups/cpu
|
mount -t cgroup -o cpu cpu /sys/fs/cgroup/cpu
|
||||||
mount -t cgroup -o cpuacct cpuacct /mnt/cgroups/cpuacct
|
mount -t cgroup -o cpuacct cpuacct /sys/fs/cgroup/cpuacct
|
||||||
|
|
||||||
mkdir /mnt/cgroups/cpu/daemons
|
mkdir /sys/fs/cgroup/cpu/daemons
|
||||||
mkdir /mnt/cgroups/cpuacct/daemons
|
mkdir /sys/fs/cgroup/cpuacct/daemons
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
@ -557,8 +557,8 @@ The configuration file:
|
||||||
.nf
|
.nf
|
||||||
mount {
|
mount {
|
||||||
.RS
|
.RS
|
||||||
cpu = /mnt/cgroups/cpu;
|
cpu = /sys/fs/cgroup/cpu;
|
||||||
cpuacct = /mnt/cgroups/cpuacct;
|
cpuacct = /sys/fs/cgroup/cpuacct;
|
||||||
.RE
|
.RE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -597,17 +597,17 @@ It corresponds to the following operations:
|
||||||
.LP
|
.LP
|
||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
mkdir /mnt/cgroups/cpu
|
mkdir /sys/fs/cgroup/cpu
|
||||||
mkdir /mnt/cgroups/cpuacct
|
mkdir /sys/fs/cgroup/cpuacct
|
||||||
mount -t cgroup -o cpu cpu /mnt/cgroups/cpu
|
mount -t cgroup -o cpu cpu /sys/fs/cgroup/cpu
|
||||||
mount -t cgroup -o cpuacct cpuacct /mnt/cgroups/cpuacct
|
mount -t cgroup -o cpuacct cpuacct /sys/fs/cgroup/cpuacct
|
||||||
|
|
||||||
mkdir /mnt/cgroups/cpuacct/daemons
|
mkdir /sys/fs/cgroup/cpuacct/daemons
|
||||||
mkdir /mnt/cgroups/cpu/daemons
|
mkdir /sys/fs/cgroup/cpu/daemons
|
||||||
mkdir /mnt/cgroups/cpu/daemons/www
|
mkdir /sys/fs/cgroup/cpu/daemons/www
|
||||||
echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
|
echo 1000 > /sys/fs/cgroup/cpu/daemons/www/cpu.shares
|
||||||
mkdir /mnt/cgroups/cpu/daemons/ftp
|
mkdir /sys/fs/cgroup/cpu/daemons/ftp
|
||||||
echo 500 > /mnt/cgroups/cpu/daemons/ftp/cpu.shares
|
echo 500 > /sys/fs/cgroup/cpu/daemons/ftp/cpu.shares
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
Group
|
Group
|
||||||
|
@ -638,8 +638,8 @@ The configuration file:
|
||||||
.nf
|
.nf
|
||||||
mount {
|
mount {
|
||||||
.RS
|
.RS
|
||||||
cpu = /mnt/cgroups/cpu;
|
cpu = /sys/fs/cgroup/cpu;
|
||||||
cpuacct = /mnt/cgroups/cpu;
|
cpuacct = /sys/fs/cgroup/cpu;
|
||||||
.RE
|
.RE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -696,15 +696,15 @@ It corresponds to the following operations:
|
||||||
.LP
|
.LP
|
||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
mkdir /mnt/cgroups/cpu
|
mkdir /sys/fs/cgroup/cpu
|
||||||
mount -t cgroup -o cpu,cpuacct cpu /mnt/cgroups/cpu
|
mount -t cgroup -o cpu,cpuacct cpu /sys/fs/cgroup/cpu
|
||||||
|
|
||||||
chown root:operator /mnt/cgroups/cpu/*
|
chown root:operator /sys/fs/cgroup/cpu/*
|
||||||
chown root:operator /mnt/cgroups/cpu/tasks
|
chown root:operator /sys/fs/cgroup/cpu/tasks
|
||||||
|
|
||||||
mkdir /mnt/cgroups/cpu/daemons
|
mkdir /sys/fs/cgroup/cpu/daemons
|
||||||
chown root:operator /mnt/cgroups/cpu/daemons/*
|
chown root:operator /sys/fs/cgroup/cpu/daemons/*
|
||||||
chown root:daemonmaster /mnt/cgroups/cpu/daemons/tasks
|
chown root:daemonmaster /sys/fs/cgroup/cpu/daemons/tasks
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
@ -731,8 +731,8 @@ The configuration file:
|
||||||
.nf
|
.nf
|
||||||
mount {
|
mount {
|
||||||
.RS
|
.RS
|
||||||
cpu = /mnt/cgroups/cpu;
|
cpu = /sys/fs/cgroup/cpu;
|
||||||
cpuacct = /mnt/cgroups/cpuacct;
|
cpuacct = /sys/fs/cgroup/cpuacct;
|
||||||
.RE
|
.RE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -754,8 +754,8 @@ cpu {
|
||||||
.RE
|
.RE
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir /mnt/cgroups/cpu/daemons
|
mkdir /sys/fs/cgroup/cpu/daemons
|
||||||
mkdir /mnt/cgroups/cpuacct/daemons
|
mkdir /sys/fs/cgroup/cpuacct/daemons
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,6 @@
|
||||||
#}
|
#}
|
||||||
#
|
#
|
||||||
#mount {
|
#mount {
|
||||||
# cpu = /mnt/cgroups/cpu;
|
# cpu = /sys/fs/cgroup/cpu;
|
||||||
# cpuacct = /mnt/cgroups/cpuacct;
|
# cpuacct = /sys/fs/cgroup/cpuacct;
|
||||||
#}
|
#}
|
||||||
|
|
Loading…
Reference in New Issue