]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
Add the description about a new rule.
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Fri, 26 Jun 2009 05:51:46 +0000 (14:51 +0900)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Mon, 29 Jun 2009 11:21:11 +0000 (16:51 +0530)
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5:
================
 * New patch.

Description:
============
This patch add the description about a new rule to both the manpage
of cgrules.conf and the sample of cgrules.conf.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
doc/man/cgrules.conf.5
samples/cgrules.conf

index 30914bb4222ec3d68208468c46c6af276e4d10cf..ab9d19bfde0d187fcd3fb6a29e28cc2fbbaeb6f3 100644 (file)
@@ -15,11 +15,14 @@ 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
+Rules have two formats
 
 .in +4n
 .nf
-<user>         <controllers>           <destination>
+<user>                 <controllers>           <destination>
+.fi
+.nf
+<user>:<process name>  <controllers>           <destination>
 .fi
 .in
 
@@ -36,6 +39,13 @@ can be:
       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
@@ -65,6 +75,13 @@ the processes of user
 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
index 18446337c0fc070835af88292b1c7956e3851175..48495eeffff5d7c40fcf581e66b18659d079ab3c 100644 (file)
@@ -1,11 +1,12 @@
 # /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)
@@ -21,7 +26,7 @@
 #       - 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.
@@ -37,6 +42,7 @@
 #<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/