From 53c034ae094c1f46d3cdab1dfbb0aa74ce9b45f0 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 27 Dec 2022 12:18:33 +0300 Subject: [PATCH] bin/cgmem_*: Mounted memory cgroup at `/sys/fs/cgroup/memory` Fred up `/sys/fs/cgroup` for other cgroups. --- bin/cgmem_nice | 2 +- bin/cgmem_which | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5