From bc1e2f6df728f682d4d09a725a62e02547d833db Mon Sep 17 00:00:00 2001 From: Dhaval Giani Date: Wed, 13 Aug 2008 19:58:05 +0000 Subject: libcgroup: New API interfaces for task placement From: Vivek Goyal Enhancement to libcg to do following. - Parse the /etc/cgrules.conf file and place the task in the right cgroup. - Exported two APIs which can place the task based on /etc/cgrules.conf or based on cgroup explicitly specified by the caller. - There can be multiple users. - PAM module (pam_cgroup) - cgexec tool - cgclassify tool - APIs can be directly used by other cgroup aware user progarams. - Classification daemon Signed-off-by: Vivek Goyal Signed-off-by: Dhaval Giani git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@136 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- samples/cgrules.conf | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 samples/cgrules.conf (limited to 'samples') 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: +# +# +# +#Where: +# 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. +# +# can be: +# - comma separated controller names (no spaces) +# - * (for all mounted controllers) +# +# 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. +# +# +# +# +#john cpu usergroup/faculty/john/ +#@student cpu,memory usergroup/student/ +#peter cpu test1/ +#% memory test2/ +#@root * admingroup/ +#* * default/ +# End of file -- cgit