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
|
||||
based on uid and gid. So a hierarchy might look like as follows.
|
||||
|
||||
/mnt/cgroup
|
||||
/sys/fs/cgroup
|
||||
| |
|
||||
gid1 gid2
|
||||
| |
|
||||
|
|
|
@ -262,8 +262,8 @@ The configuration file:
|
|||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
cpuacct = /mnt/cgroups/cpu;
|
||||
cpu = /sys/fs/cgroup/cpu;
|
||||
cpuacct = /sys/fs/cgroup/cpu;
|
||||
.RE
|
||||
}
|
||||
.fi
|
||||
|
@ -274,8 +274,8 @@ inside. It corresponds to the following operations:
|
|||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mkdir /mnt/cgroups/cpu
|
||||
mount -t cgroup -o cpu,cpuacct cpu /mnt/cgroups/cpu
|
||||
mkdir /sys/fs/cgroup/cpu
|
||||
mount -t cgroup -o cpu,cpuacct cpu /sys/fs/cgroup/cpu
|
||||
.fi
|
||||
.RE
|
||||
|
||||
|
@ -287,9 +287,9 @@ The configuration file:
|
|||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
"name=scheduler" = /mnt/cgroups/cpu;
|
||||
"name=noctrl" = /mnt/cgroups/noctrl;
|
||||
cpu = /sys/fs/cgroup/cpu;
|
||||
"name=scheduler" = /sys/fs/cgroup/cpu;
|
||||
"name=noctrl" = /sys/fs/cgroup/noctrl;
|
||||
.RE
|
||||
}
|
||||
|
||||
|
@ -317,14 +317,14 @@ following operations:
|
|||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mkdir /mnt/cgroups/cpu
|
||||
mount -t cgroup -o cpu,name=scheduler cpu /mnt/cgroups/cpu
|
||||
mount -t cgroup -o none,name=noctrl none /mnt/cgroups/noctrl
|
||||
mkdir /sys/fs/cgroup/cpu
|
||||
mount -t cgroup -o cpu,name=scheduler cpu /sys/fs/cgroup/cpu
|
||||
mount -t cgroup -o none,name=noctrl none /sys/fs/cgroup/noctrl
|
||||
|
||||
mkdir /mnt/cgroups/cpu/daemons
|
||||
echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
|
||||
mkdir /sys/fs/cgroup/cpu/daemons
|
||||
echo 1000 > /sys/fs/cgroup/cpu/daemons/www/cpu.shares
|
||||
|
||||
mkdir /mnt/cgroups/noctrl/tests
|
||||
mkdir /sys/fs/cgroup/noctrl/tests
|
||||
.fi
|
||||
.RE
|
||||
|
||||
|
@ -354,8 +354,8 @@ The configuration file:
|
|||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
cpuacct = /mnt/cgroups/cpu;
|
||||
cpu = /sys/fs/cgroup/cpu;
|
||||
cpuacct = /sys/fs/cgroup/cpu;
|
||||
.RE
|
||||
}
|
||||
|
||||
|
@ -426,18 +426,18 @@ which are little bit trickier to emulate via chmod):
|
|||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mkdir /mnt/cgroups/cpu
|
||||
mount -t cgroup -o cpu,cpuacct cpu /mnt/cgroups/cpu
|
||||
mkdir /sys/fs/cgroup/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
|
||||
chown root:root /mnt/cgroups/cpu/daemons/www/*
|
||||
chown root:webmaster /mnt/cgroups/cpu/daemons/www/tasks
|
||||
echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
|
||||
mkdir /sys/fs/cgroup/cpu/daemons/www
|
||||
chown root:root /sys/fs/cgroup/cpu/daemons/www/*
|
||||
chown root:webmaster /sys/fs/cgroup/cpu/daemons/www/tasks
|
||||
echo 1000 > /sys/fs/cgroup/cpu/daemons/www/cpu.shares
|
||||
|
||||
# + 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:
|
||||
# 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
|
||||
|
||||
|
||||
mkdir /mnt/cgroups/cpu/daemons/ftp
|
||||
chown root:root /mnt/cgroups/cpu/daemons/ftp/*
|
||||
chown root:ftpmaster /mnt/cgroups/cpu/daemons/ftp/tasks
|
||||
echo 500 > /mnt/cgroups/cpu/daemons/ftp/cpu.shares
|
||||
mkdir /sys/fs/cgroup/cpu/daemons/ftp
|
||||
chown root:root /sys/fs/cgroup/cpu/daemons/ftp/*
|
||||
chown root:ftpmaster /sys/fs/cgroup/cpu/daemons/ftp/tasks
|
||||
echo 500 > /sys/fs/cgroup/cpu/daemons/ftp/cpu.shares
|
||||
|
||||
# + 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:
|
||||
# drwxr-xr-x. 2 root ftpmaster 0 Jun 16 11:51 .
|
||||
#
|
||||
|
@ -510,8 +510,8 @@ The configuration file:
|
|||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
cpuacct = /mnt/cgroups/cpuacct;
|
||||
cpu = /sys/fs/cgroup/cpu;
|
||||
cpuacct = /sys/fs/cgroup/cpuacct;
|
||||
.RE
|
||||
}
|
||||
|
||||
|
@ -530,13 +530,13 @@ It corresponds to the following operations:
|
|||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mkdir /mnt/cgroups/cpu
|
||||
mkdir /mnt/cgroups/cpuacct
|
||||
mount -t cgroup -o cpu cpu /mnt/cgroups/cpu
|
||||
mount -t cgroup -o cpuacct cpuacct /mnt/cgroups/cpuacct
|
||||
mkdir /sys/fs/cgroup/cpu
|
||||
mkdir /sys/fs/cgroup/cpuacct
|
||||
mount -t cgroup -o cpu cpu /sys/fs/cgroup/cpu
|
||||
mount -t cgroup -o cpuacct cpuacct /sys/fs/cgroup/cpuacct
|
||||
|
||||
mkdir /mnt/cgroups/cpu/daemons
|
||||
mkdir /mnt/cgroups/cpuacct/daemons
|
||||
mkdir /sys/fs/cgroup/cpu/daemons
|
||||
mkdir /sys/fs/cgroup/cpuacct/daemons
|
||||
.fi
|
||||
.RE
|
||||
|
||||
|
@ -557,8 +557,8 @@ The configuration file:
|
|||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
cpuacct = /mnt/cgroups/cpuacct;
|
||||
cpu = /sys/fs/cgroup/cpu;
|
||||
cpuacct = /sys/fs/cgroup/cpuacct;
|
||||
.RE
|
||||
}
|
||||
|
||||
|
@ -597,17 +597,17 @@ It corresponds to the following operations:
|
|||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mkdir /mnt/cgroups/cpu
|
||||
mkdir /mnt/cgroups/cpuacct
|
||||
mount -t cgroup -o cpu cpu /mnt/cgroups/cpu
|
||||
mount -t cgroup -o cpuacct cpuacct /mnt/cgroups/cpuacct
|
||||
mkdir /sys/fs/cgroup/cpu
|
||||
mkdir /sys/fs/cgroup/cpuacct
|
||||
mount -t cgroup -o cpu cpu /sys/fs/cgroup/cpu
|
||||
mount -t cgroup -o cpuacct cpuacct /sys/fs/cgroup/cpuacct
|
||||
|
||||
mkdir /mnt/cgroups/cpuacct/daemons
|
||||
mkdir /mnt/cgroups/cpu/daemons
|
||||
mkdir /mnt/cgroups/cpu/daemons/www
|
||||
echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
|
||||
mkdir /mnt/cgroups/cpu/daemons/ftp
|
||||
echo 500 > /mnt/cgroups/cpu/daemons/ftp/cpu.shares
|
||||
mkdir /sys/fs/cgroup/cpuacct/daemons
|
||||
mkdir /sys/fs/cgroup/cpu/daemons
|
||||
mkdir /sys/fs/cgroup/cpu/daemons/www
|
||||
echo 1000 > /sys/fs/cgroup/cpu/daemons/www/cpu.shares
|
||||
mkdir /sys/fs/cgroup/cpu/daemons/ftp
|
||||
echo 500 > /sys/fs/cgroup/cpu/daemons/ftp/cpu.shares
|
||||
.fi
|
||||
.RE
|
||||
Group
|
||||
|
@ -638,8 +638,8 @@ The configuration file:
|
|||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
cpuacct = /mnt/cgroups/cpu;
|
||||
cpu = /sys/fs/cgroup/cpu;
|
||||
cpuacct = /sys/fs/cgroup/cpu;
|
||||
.RE
|
||||
}
|
||||
|
||||
|
@ -696,15 +696,15 @@ It corresponds to the following operations:
|
|||
.LP
|
||||
.RS
|
||||
.nf
|
||||
mkdir /mnt/cgroups/cpu
|
||||
mount -t cgroup -o cpu,cpuacct cpu /mnt/cgroups/cpu
|
||||
mkdir /sys/fs/cgroup/cpu
|
||||
mount -t cgroup -o cpu,cpuacct cpu /sys/fs/cgroup/cpu
|
||||
|
||||
chown root:operator /mnt/cgroups/cpu/*
|
||||
chown root:operator /mnt/cgroups/cpu/tasks
|
||||
chown root:operator /sys/fs/cgroup/cpu/*
|
||||
chown root:operator /sys/fs/cgroup/cpu/tasks
|
||||
|
||||
mkdir /mnt/cgroups/cpu/daemons
|
||||
chown root:operator /mnt/cgroups/cpu/daemons/*
|
||||
chown root:daemonmaster /mnt/cgroups/cpu/daemons/tasks
|
||||
mkdir /sys/fs/cgroup/cpu/daemons
|
||||
chown root:operator /sys/fs/cgroup/cpu/daemons/*
|
||||
chown root:daemonmaster /sys/fs/cgroup/cpu/daemons/tasks
|
||||
.fi
|
||||
.RE
|
||||
|
||||
|
@ -731,8 +731,8 @@ The configuration file:
|
|||
.nf
|
||||
mount {
|
||||
.RS
|
||||
cpu = /mnt/cgroups/cpu;
|
||||
cpuacct = /mnt/cgroups/cpuacct;
|
||||
cpu = /sys/fs/cgroup/cpu;
|
||||
cpuacct = /sys/fs/cgroup/cpuacct;
|
||||
.RE
|
||||
}
|
||||
|
||||
|
@ -754,8 +754,8 @@ cpu {
|
|||
.RE
|
||||
}
|
||||
|
||||
mkdir /mnt/cgroups/cpu/daemons
|
||||
mkdir /mnt/cgroups/cpuacct/daemons
|
||||
mkdir /sys/fs/cgroup/cpu/daemons
|
||||
mkdir /sys/fs/cgroup/cpuacct/daemons
|
||||
.fi
|
||||
.RE
|
||||
|
||||
|
|
|
@ -43,6 +43,6 @@
|
|||
#}
|
||||
#
|
||||
#mount {
|
||||
# cpu = /mnt/cgroups/cpu;
|
||||
# cpuacct = /mnt/cgroups/cpuacct;
|
||||
# cpu = /sys/fs/cgroup/cpu;
|
||||
# cpuacct = /sys/fs/cgroup/cpuacct;
|
||||
#}
|
||||
|
|
Loading…
Reference in New Issue