10

I'm trying to test cgroup and, after I set it, I stumbled upon that error. That's what I did:

  • creation of the group grp
  • creation of the user test within the grp group

I ran the command:

sudo cgcreate -t test:grp -a sleax -g memory,cpu:grp
echo '10000000'> /sys/fs/cgroup/memory/grp/memory.limit_in_bytes

Then i went to try that with the user test:

test@sleax-PC:~$ cgexec stress -t 20 -c 99 -i 99
cgroup change of group failed

And that's the error I get. Why? I set -t test:grp so test is able to write the PIDs.

sl34x
  • 101
  • 1
  • 4
  • 5
    Possible duplicate of [How to use cgroup in ubuntu 13.04](http://askubuntu.com/questions/345055/how-to-use-cgroup-in-ubuntu-13-04) – user.dz Jun 07 '16 at 03:18

1 Answers1

5

Specifying users and groups works fine when you create a subsystem.

sudo cgcreate -t $USER:$USER -a $USER:$USER  -g cpu:testgroupcpu 

"cgroup change of group failed" error with cgexec from libcgroup

Terrence
  • 51
  • 1
  • 2