1
.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
2
.\" Written by Ivana Varekova <varekova@redhat.com>
4
.TH CGEXEC 1 2009-03-15 "Linux" "libcgroup Manual"
7
cgexec \- run the task in given control groups
10
\fBcgexec\fR [\fB-g\fR <\fIcontrollers>:<path\fR>] [--sticky] \fBcommand\fR [\fIarguments\fR]
14
program executes the task \fBcommand\fR
15
with arguments \fBarguments\fR in given control groups.
18
.B -g <controllers>:<path>
19
defines control groups in which the task will be run.
20
\fBcontrollers\fR is a list of controllers and
21
\fBpath\fR is the relative path to control groups
22
in the given controllers list.
24
This flag can be used multiple times to
25
define multiple pairs of lists of controllers
27
Instead of the list of all mounted controllers,
28
wildcard \fBb*b\fR can be used.
30
If this option is not used then
31
\fBcgexec\fR will automatically place the task to the right
32
cgroup based on \fB/etc/cgrules.conf\fR.
36
If running the task \fBcommand\fR with this option, the daemon of
37
service cgred (cgrulesengd process) does not change both the task
38
of the \fBcommand\fR and the children tasks. Without this option,
39
the daemon does not change the task of the \fBcommand\fR but it
40
changes the children tasks to the right cgroup based on
41
\fB/etc/cgrules.conf\fR automatically.
52
runs command \fBls\fR in control group test1
53
in all mounted controllers.
57
cgexec -g cpu,memory:test1 ls -l
60
runs command \fBls -l\fR in control group test1
61
in controllers cpu and memory.
65
cgexec -g cpu,memory:test1 -g swap:test2 ls -l
68
runs command \fBls -l\fR in control group test1
69
in controllers cpu and memory and control group
70
test2 in controller swap.
78
default libcgroup configuration file