]> git.phdru.name Git - dotfiles.git/commitdiff
bin/cgmem_*: Mounted memory cgroup at `/sys/fs/cgroup/memory`
authorOleg Broytman <phd@phdru.name>
Tue, 27 Dec 2022 09:18:33 +0000 (12:18 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 27 Dec 2022 10:44:53 +0000 (13:44 +0300)
Fred up `/sys/fs/cgroup` for other cgroups.

bin/cgmem_nice
bin/cgmem_which

index 212ec3ca4ec953773f4e1385bd50b9525276a0d9..aa8eecc0e1e20b15cf8e2b1c6c7b1e25d1b920ff 100755 (executable)
@@ -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
index 81ef03f8331071f4a315658c52f03c843c58e4d9..ed03705eb3ca4af789763c4436e1ccb17e2411f8 100755 (executable)
@@ -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