Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cgrules.conf(5) [centos man page]

CGRULES.CONF(5) 						 libcgroup Manual						   CGRULES.CONF(5)

NAME
cgrules.conf - libcgroup configuration file DESCRIPTION
cgrules.conf configuration file is used by libcgroups to define control groups to which a process belongs. The file contains a list of rules which assign to a defined group/user a control group in a subsystem (or control groups in subsystems). Rules have two formats: <user> <controllers> <destination> <user>:<process name> <controllers> <destination> Where: user can be: - a user name - a group name with @group syntax - the wildcard '*', for any user or group - '%', which is equivalent to "ditto" (useful for multi-line 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 controllers can be: - comma separated controller names (no spaces) or - * (for all mounted controllers) destination can be: - path relative to the controller hierarchy (ex. pgrp1/gid1/uid1) - following strings called "templates" and will get expanded %u username, uid if name resolving fails %U uid %g group name, gid if name resolving fails %G gid %p process name, pid if name not available %P pid '' can be used to escape '%' First rule which matches the criteria will be executed. Any text starting with '#' is considered as a start of comment line and is ignored. If the destination contains template string, the control group can be created on-fly. In time when some process wants to use the template rule which leads to control group (see cgexec (1)) and the control group does not exist, the group is created. The template control group parameters can be specified in cgconfig.conf configuration file. See (cgconfig.conf (5)). If the template definition is not found there created group have default kernel setting. EXAMPLES
student devices /usergroup/students Student's processes in the 'devices' subsystem belong to the control group /usergroup/students. student:cp devices /usergroup/students/cp When student executes 'cp' command, the processes in the 'devices' subsystem belong to the control group /usergroup/students/cp. @admin * admingroup/ Processes started by anybody from admin group no matter in what subsystem belong to the control group admingroup/. peter cpu test1/ % memory test2/ The first line says Peter's task for cpu controller belongs to test1 control group. The second one says Peter's tasks for memory controller belong to test2/ control group. * * default/ All processes in any subsystem belong to the control group default/. Since the earliest matched rule is applied, it makes sense to have this line at the end of the list. It will put a task which was not mentioned in the previous rules to default/ control group. @students cpu,cpuacct students/%u Processes in cpu and cpuacct subsystems started by anybody from students group belong to group students/name. Where "name" is user name of owner of the process. FILES
/etc/cgrules.conf default libcgroup configuration file SEE ALSO
cgconfig.conf (5), cgclassify (1), cgred.conf (5) BUGS
Linux 2009-03-10 CGRULES.CONF(5)

Check Out this Related Man Page

CGRULESENGD(8)							 libcgroup Manual						    CGRULESENGD(8)

NAME
cgrulesengd - control group rules daemon SYNOPSIS
cgrulesengd [options] DESCRIPTION
cgrulesengd is a daemon, which distributes processes to control groups. When any process changes its effective UID or GID, cgrulesengd inspects the list of rules loaded from the cgrules.conf file and moves the process to the appropriate control group. The list of rules is read during the daemon startup is are cached in the daemon's memory. The daemon reloads the list of rules when it receives SIGUSR2 signal. The daemon opens a standard unix socket to receive 'sticky' requests from cgexec. OPTIONS
-h|--help Display help. -f <path>|--logfile=<path> Write log messages to the given log file. When '-' is used as <path>, log messages are written to the standard output. If '-f' and '-s' are used together, the logs are sent to both destinations. -s[facility]|--syslog=[facility] Write log messages to syslog. The default facility is DAEMON. If '-f' and '-s' are used together, the logs are sent to both destina- tions. -n|--nodaemon Don't fork the daemon, stay in the foreground. -v|--verbose Display more log messages. This option can be used twice to enable more verbose log messages. -q|--quiet Display less log messages. This option can be used twice to enable even less log messages and to only log errors. -Q|--nolog Disable logging. -d|--debug Equivalent to '-nvvf -', i.e. don't fork the daemon, display all log messages and write them to the standard output. -u <user>|--socket-user=<user> -g <group>|--socket-group=<group> Set the owner of cgrulesengd socket. Assumes that cgexec runs with proper suid permissions so it can write to the socket when cgexec --sticky is used. FILES
/etc/cgrules.conf the default libcgroup configuration file SEE ALSO
cgrules.conf (5) Linux 2009-02-18 CGRULESENGD(8)
Man Page