Minor cgroup documentation fixes.

This commit is contained in:
Dan Sanders 2016-06-20 12:54:05 -07:00
parent 0fbbb95666
commit 9f518957cf
2 changed files with 8 additions and 7 deletions

View File

@ -243,12 +243,12 @@ Options:
Number of bytes to allocate for tmpfsmounts (default: 4194304) Number of bytes to allocate for tmpfsmounts (default: 4194304)
--disable_proc --disable_proc
Disable mounting /proc in the jail Disable mounting /proc in the jail
--cgroup_mem_mount VALUE
Where to mount memory cgroup FS (default: '/cgroup_memory'
--cgroup_mem_parent VALUE
Which memory cgroup to use (default: 'NSJAIL')
--cgroup_mem_max VALUE --cgroup_mem_max VALUE
Maximum number of bytes to use in the group Maximum number of bytes to use in the group (default: '0' - disabled)
--cgroup_mem_mount VALUE
Location of memory cgroup FS (default: '/sys/fs/cgroup/memory')
--cgroup_mem_parent VALUE
Which pre-existing memory cgroup to use as a parent (default: 'NSJAIL')
--iface_no_lo --iface_no_lo
Don't bring up the 'lo' interface Don't bring up the 'lo' interface
--iface|-I VALUE --iface|-I VALUE
@ -267,5 +267,6 @@ Options:
nsjail -Mr --chroot / -- /bin/echo "ABC" nsjail -Mr --chroot / -- /bin/echo "ABC"
Run echo command once only, as a sub-process Run echo command once only, as a sub-process
nsjail -Mo --chroot / -- /bin/echo "ABC" nsjail -Mo --chroot / -- /bin/echo "ABC"
Execute echo command directly, without a supervising proces Execute echo command directly, without a supervising process
nsjail -Me --chroot / --disable_proc -- /bin/echo "ABC"
``` ```

View File

@ -67,7 +67,7 @@ bool cgroupInitNsFromParent(struct nsjconf_t *nsjconf, pid_t pid)
* Use OOM-killer instead of making processes hang/sleep * Use OOM-killer instead of making processes hang/sleep
*/ */
snprintf(fname, sizeof(fname), "%s/memory.oom_control", mem_cgroup_path); snprintf(fname, sizeof(fname), "%s/memory.oom_control", mem_cgroup_path);
LOG_D("Writting '1' '%s'", fname); LOG_D("Writting '0' '%s'", fname);
if (utilWriteBufToFile(fname, "0", strlen("0"), O_WRONLY) == false) { if (utilWriteBufToFile(fname, "0", strlen("0"), O_WRONLY) == false) {
LOG_E("Could not update memory cgroup oom control"); LOG_E("Could not update memory cgroup oom control");
return false; return false;