to a defined group/user a control group in a subsystem
(or control groups in subsystems)
-Rules have the form:
+Rules have two formats:
.in +4n
.nf
-<user> <controllers> <destination>
+<user> <controllers> <destination>
+.fi
+.nf
+<user>:<process name> <controllers> <destination>
.fi
.in
specified for various hierarchies for a single user)
.fi
+.I process name
+is optional and it can be:
+.nf
+ - a process name
+ - a full command path of a process
+.fi
+
.I controllers
can be:
.nf
student
in the subsystem 'device' belong to the control group /usergroup/students.
+.nf
+student:cp devices /usergroup/students/cp
+.fi
+the 'cp' command processes of user
+student
+in the subsystem 'device' belong to the control group /usergroup/students/cp.
+
.nf
@admin * admingroup/
.fi
# /etc/cgrules.conf
#
-#Each line describes a rule for a user in the form:
+#Each line describes a rule for a user in the forms:
#
-#<user> <controllers> <destination>
+#<user> <controllers> <destination>
+#<user>:<process name> <controllers> <destination>
#
#Where:
-#<user> can be:
+# <user> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for any user or group.
# multiline 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
+#
# <controller> can be:
# - comma separated controller names (no spaces)
# - * (for all mounted controllers)
# - path with-in the controller hierarchy (ex. pgrp1/gid1/uid1)
#
# Note:
-# - It currently has rules only based on uids and gids.
+# - It currently has rules based on uids, gids and process name.
#
# - Don't put overlapping rules. First rule which matches the criteria
# will be executed.
#<user> <controllers> <destination>
#
#john cpu usergroup/faculty/john/
+#john:cp cpu usergroup/faculty/john/cp
#@student cpu,memory usergroup/student/
#peter cpu test1/
#% memory test2/