Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. # Create a memory cgroup named 'mygroup', allowing $USER to change the parameters and run tasks in the cgroup.
  2. sudo cgcreate -a $USER -t $USER -g memory:mygroup
  3. # Set the memory limit to 10MB
  4. echo 10000000 > /sys/fs/cgroup/memory/mygroup/memory.limit_in_bytes
  5. # Run a program in the cgroup
  6. cgexec -g memory:mygroup ls
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement