CGRULES.CONF - Online Linux Manual PageSection : 5
Updated : 2009-03-10
Source : Linux
Note : libcgroup Manual

NAMEcgrules.conf − libcgroup configuration file

DESCRIPTIONcgrules.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 processcontrollers 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.

EXAMPLESstudent devices /usergroup/studentsStudent's processes in the 'devices' subsystem belong to the control group /usergroup/students. student:cp devices /usergroup/students/cpWhen 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/%uProcesses 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  .PD .

SEE ALSOcgconfig.conf (5), cgclassify (1), cgred.conf (5)

BUGS
0
Johanes Gumabo
Data Size   :   9,913 byte
man-cgrules.conf.5Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 236,801
Visitor ID   :     :  
Visitor IP   :   18.221.217.100   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (rof_unit_scale_px|46|cgrules.conf.5|141|.|.PD . )         (rof_PD|16|cgrules.conf.5|141|.|.PD . )