Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Create a memory cgroup named 'mygroup', allowing $USER to change the parameters and run tasks in the cgroup.
- sudo cgcreate -a $USER -t $USER -g memory:mygroup
- # Set the memory limit to 10MB
- echo 10000000 > /sys/fs/cgroup/memory/mygroup/memory.limit_in_bytes
- # Run a program in the cgroup
- cgexec -g memory:mygroup ls
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement