CGRULES.CONF(5) libcgroup Manual CGRULES.CONF(5)

NAME cgrules.conf - libcgroup configuration file

DESCRIPTION cgrules.conf configuration file is used by libcgroups to define the control groups to which the process belongs to.

The file the contains list of rules which assign to a defined group/user a control group in a subsystem (or control groups in subsys- tems)

Rules have two formats:

<user> <controllers> <destination> <user>:<process name> <controllers> <destination>

Where:

user can be: - an user name - a group name, with @group syntax - the wildcard *, for any user or group - %, which is equivalent to "ditto" (useful for multi-line rules where different cgroups need to be specified for various hierarchies for a single user)

process name is optional and it can be: - a process name - a full command path of a process

controllers can be: - comma separated controller names (no spaces) or - * (for all mounted controllers)

destination can be: - path relative to the controller hierarchy (ex. pgrp1/gid1/uid1)

First rule which matches the criteria will be executed.

Any text starting with # is considered as a start of comment line and is ignored.

EXAMPLES student devices /usergroup/students the processes of user student in the subsystem device belong to the control group /usergroup/students.

student:cp devices /usergroup/students/cp the cp command processes of user student in the subsystem device belong to the control group /usergroup/students/cp.

@admin * admingroup/ the processes which belong to group admin in all subsystems belongs to the control group /admingroup.

peter cpu test1/ % memory test2/ First line says Peters task for cpu controller belongs to test1 con- trol group second line says put Peter s tasks for memory controller belongs to test2/ control group

* * default/ all processes belong in all subsystems to the control group default/. Because there is applied the first task which is find - it has a sense to have this row at the end of list to put the tasks which was not men- tioned in the previous rules to the default/ control group.

FILES /etc/cgrules.conf default libcgroup configuration file

SEE ALSO cgconfig.conf (5), cgclassify (1), cgred.conf(5)

BUGS Linux 2009-03-10 CGRULES.CONF(5)