summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/cgrules.conf45
1 files changed, 45 insertions, 0 deletions
diff --git a/samples/cgrules.conf b/samples/cgrules.conf
new file mode 100644
index 0000000..1844633
--- /dev/null
+++ b/samples/cgrules.conf
@@ -0,0 +1,45 @@
+# /etc/cgrules.conf
+#
+#Each line describes a rule for a user in the form:
+#
+#<user> <controllers> <destination>
+#
+#Where:
+#<user> can be:
+# - an user name
+# - a group name, with @group syntax
+# - the wildcard *, for any user or group.
+# - The %, which is equivalent to "ditto". This is useful for
+# multiline rules where different cgroups need to be specified
+# for various hierarchies for a single user.
+#
+# <controller> can be:
+# - comma separated controller names (no spaces)
+# - * (for all mounted controllers)
+#
+# <destination> can be:
+# - path with-in the controller hierarchy (ex. pgrp1/gid1/uid1)
+#
+# Note:
+# - It currently has rules only based on uids and gids.
+#
+# - Don't put overlapping rules. First rule which matches the criteria
+# will be executed.
+#
+# - Multiline rules can be specified for specifying different cgroups
+# for multiple hierarchies. In the example below, user "peter" has
+# specified 2 line rule. First line says put peter's task in test1/
+# dir for "cpu" controller and second line says put peter's tasks in
+# test2/ dir for memory controller. Make a note of "%" sign in second line.
+# This is an indication that it is continuation of previous rule.
+#
+#
+#<user> <controllers> <destination>
+#
+#john cpu usergroup/faculty/john/
+#@student cpu,memory usergroup/student/
+#peter cpu test1/
+#% memory test2/
+#@root * admingroup/
+#* * default/
+# End of file