1
2CGEXEC(1)                      libcgroup Manual                      CGEXEC(1)
3
4
5

NAME

7       cgexec - run the task in given control groups
8
9

SYNOPSIS

11       cgexec [-g <controllers>:<path>] [--sticky] command [arguments]
12
13

DESCRIPTION

15       The  cgexec  program executes the task command with arguments arguments
16       in given control groups.
17
18
19       -g <controllers>:<path>
20              defines control groups in which the  task  will  be  run.   con‐
21              trollers  is a list of controllers and path is the relative path
22              to control groups in the given controllers list.
23
24              This flag can be used multiple times to define multiple pairs of
25              lists of controllers and relative paths.  Instead of the list of
26              all mounted controllers, wildcard b"*b" can be used.
27
28              If this option is not used then cgexec will automatically  place
29              the task to the right cgroup based on /etc/cgrules.conf.
30
31
32       --sticky
33              If running the task command with this option, the daemon of ser‐
34              vice cgred (cgrulesengd process) does not change both  the  task
35              of  the command and the children tasks. Without this option, the
36              daemon does not change the task of the command  but  it  changes
37              the    children   tasks   to   the   right   cgroup   based   on
38              /etc/cgrules.conf automatically.
39
40

EXAMPLES

42       cgexec -g *:test1 ls
43       runs command ls in control group test1 in all mounted controllers.
44
45       cgexec -g cpu,memory:test1 ls -l
46       runs command ls -l in control group test1 in controllers cpu  and  mem‐
47       ory.
48
49       cgexec -g cpu,memory:test1 -g swap:test2 ls -l
50       runs command ls -l in control group test1 in controllers cpu and memory
51       and control group test2 in controller swap.
52
53

FILES

55       /etc/cgrules.conf
56       default libcgroup configuration file
57

SEE ALSO

59       cgrules.conf (5)
60
61
62
63Linux                             2009-03-15                         CGEXEC(1)
Impressum