summaryrefslogtreecommitdiffstats
path: root/doc/man/cgrules.conf.5
blob: 30914bb4222ec3d68208468c46c6af276e4d10cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved. 
.\" Written by Ivana Varekova <varekova@redhat.com> 

.TH CGRULES.CONF  5 2009-03-10 "Linux" "libcgroup Manual"
.SH NAME
cgrules.conf \- libcgroup configuration file 
.SH DESCRIPTION
.B "cgrules.conf"
configuration file is used by
.B 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 subsystems)

Rules have the form: 

.in +4n
.nf
<user>		<controllers>		<destination>
.fi
.in

Where:

.I user
can be:
.nf
    - 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)
.fi

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

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

First rule which matches the criteria  will be executed.


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


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

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

.nf
peter           cpu             test1/
%               memory          test2/
.fi
First line says Peter's task for cpu controller
belongs to test1 control group
second line says put Peter's tasks for memory controller
belongs to test2/ control group

.nf 
*               *               default/ 
.fi
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 mentioned in the previous rules
to the default/ control group.



.SH FILES
.LP
.PD .1v
.TP 20
.B /etc/cgrules.conf
.TP
default libcgroup configuration file
.PD.


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

.SH BUGS