1
2CGRULES.CONF(5)                libcgroup Manual                CGRULES.CONF(5)
3
4
5

NAME

7       cgrules.conf - libcgroup configuration file
8

DESCRIPTION

10       cgrules.conf  configuration  file  is  used by libcgroups to define the
11       control groups to which the process belongs to.
12
13
14       The file  the  contains  list  of  rules  which  assign  to  a  defined
15       group/user a control group in a subsystem (or control groups in subsys‐
16       tems)
17
18       Rules have two formats:
19
20           <user>                   <controllers>       <destination>
21           <user>:<process name>    <controllers>       <destination>
22
23       Where:
24
25       user can be:
26           - an user name
27           - a group name, with @group syntax
28           - the wildcard '*', for any user or group
29           - '%', which is equivalent to "ditto" (useful for
30             multi-line rules where different cgroups need to be
31             specified for various hierarchies for a single user)
32
33       process name is optional and it can be:
34           - a process name
35           - a full command path of a process
36
37       controllers can be:
38           - comma separated controller names (no spaces) or
39           - * (for all mounted controllers)
40
41       destination can be:
42           - path relative to the controller hierarchy (ex. pgrp1/gid1/uid1)
43
44
45       First rule which matches the criteria  will be executed.
46
47
48       Any text starting with '#' is considered as a start of comment line and
49       is ignored.
50
51
52

EXAMPLES

54       student         devices         /usergroup/students
55       the  processes  of user student in the subsystem 'device' belong to the
56       control group /usergroup/students.
57
58       student:cp       devices         /usergroup/students/cp
59       the 'cp' command processes of user student in  the  subsystem  'device'
60       belong to the control group /usergroup/students/cp.
61
62       @admin           *              admingroup/
63       the  processes which belong to group admin in all subsystems belongs to
64       the control group /admingroup.
65
66       peter           cpu             test1/
67       %               memory          test2/
68       First line says Peter's task for cpu controller belongs to  test1  con‐
69       trol  group  second  line  says put Peter's tasks for memory controller
70       belongs to test2/ control group
71
72       *               *               default/
73       all processes belong in all subsystems to the control  group  default/.
74       Because  there is applied the first task which is find - it has a sense
75       to have this row at the end of list to put the tasks which was not men‐
76       tioned in the previous rules to the default/ control group.
77
78
79
80

FILES

82       /etc/cgrules.conf
83       default libcgroup configuration file
84
85

SEE ALSO

87       cgconfig.conf (5), cgclassify (1), cgred.conf(5)
88

BUGS

90Linux                             2009-03-10                   CGRULES.CONF(5)
Impressum