cgexec - run the task in given control groups
This flag can be used multiple times to define multiple pairs of lists of controllers and relative paths. Instead of the list of all mounted controllers, the wildcard b"*b" can be used.
If this option is not used, cgexec will automatically place the task in the right cgroup based on /etc/cgrules.conf.
If /etc/cgrules.conf configuration file is used, there can be used template names. Then the control group name contains a template in destination tag (see cgrules.conf (5)) and if the cgroup does not exist in execution time, it is created, based on /etc/cgconfig.conf specification. If the specifications are not present the group is created with the default kernel values.
cgexec -g *:test1 lsruns command ls in control group test1 in all mounted controllers.
cgexec -g cpu,memory:test1 ls -lruns command ls -l in control group test1 in controllers cpu and memory.
cgexec -g cpu,memory:test1 -g swap:test2 ls -lruns command ls -l in control group test1 in controllers cpu and memory and control group test2 in controller swap.