summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2009-06-26 14:51:46 +0900
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2009-06-29 16:51:11 +0530
commit20bbfbdfd8777de4cc1c83a9d583ace36c6f2cd2 (patch)
tree8631013e1939b753c742c47863ab0eccef2684eb
parent3f066c5cec75b9a75a533e6403b25a988ed66986 (diff)
downloadlibcg-20bbfbdfd8777de4cc1c83a9d583ace36c6f2cd2.tar.gz
libcg-20bbfbdfd8777de4cc1c83a9d583ace36c6f2cd2.tar.xz
libcg-20bbfbdfd8777de4cc1c83a9d583ace36c6f2cd2.zip
Add the description about a new rule.
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>
-rw-r--r--doc/man/cgrules.conf.521
-rw-r--r--samples/cgrules.conf14
2 files changed, 29 insertions, 6 deletions
diff --git a/doc/man/cgrules.conf.5 b/doc/man/cgrules.conf.5
index 30914bb..ab9d19b 100644
--- a/doc/man/cgrules.conf.5
+++ b/doc/man/cgrules.conf.5
@@ -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
@@ -66,6 +76,13 @@ 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
the processes which belong to group
diff --git a/samples/cgrules.conf b/samples/cgrules.conf
index 1844633..48495ee 100644
--- a/samples/cgrules.conf
+++ b/samples/cgrules.conf
@@ -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.
@@ -13,6 +14,10 @@
# 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/