From: Oleg Broytman Date: Tue, 27 Dec 2022 09:18:33 +0000 (+0300) Subject: bin/cgmem_*: Mounted memory cgroup at `/sys/fs/cgroup/memory` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=53c034ae094c1f46d3cdab1dfbb0aa74ce9b45f0;p=dotfiles.git bin/cgmem_*: Mounted memory cgroup at `/sys/fs/cgroup/memory` Fred up `/sys/fs/cgroup` for other cgroups. --- diff --git a/bin/cgmem_nice b/bin/cgmem_nice index 212ec3c..aa8eecc 100755 --- a/bin/cgmem_nice +++ b/bin/cgmem_nice @@ -16,7 +16,7 @@ esac size="$1" # in megabytes shift -CGROUPS=/sys/fs/cgroup +CGROUPS=/sys/fs/cgroup/memory echo $$ > "$CGROUPS"/${size}M/tasks || exit 1 ulimit -d ${size}000 diff --git a/bin/cgmem_which b/bin/cgmem_which index 81ef03f..ed03705 100755 --- a/bin/cgmem_which +++ b/bin/cgmem_which @@ -1,2 +1,2 @@ #! /bin/sh -grep -Flw $$ /sys/fs/cgroup/*/tasks | cut -d/ -f5 +grep -Flw $$ /sys/fs/cgroup/memory/*M/tasks | cut -d/ -f6