Skip to content

spacemonkeyinc/cgroups-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cgroups-setup

this package provides a cgroup-lite style package for cgroup configuration, along with a utility for making cgroup configuration scripts.

in addition to the cgroup-mount and cgroup-umount commands, along with an init script for mounting the cgroup hierarchy, this package provides spacemonkey-cgroup-setup, which is ordinarily used like a script interpreter itself.

for example, let's say you want to limit memory for a particular type of process.

first you write a spacemonkey-cgroups-setup script (example-cgroup-setup) like so:

#!/usr/bin/spacemonkey-cgroups-setup memory

echo 64M > memory.soft_limit_in_bytes
echo 96M > memory.limit_in_bytes
echo 128M > memory.memsw.limit_in_bytes

then, you run your script with the pid of the process you want to limit as its first argument, like

example-cgroup-setup $DAEMON_PID

Often this last step is added to the start section of the init script of the daemon process you want to manage.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages