]> git.phdru.name Git - dotfiles.git/commitdiff
Feat: Add `cgmem_which`
authorOleg Broytman <phd@phdru.name>
Fri, 12 Jun 2020 14:17:08 +0000 (17:17 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 12 Jun 2020 14:17:08 +0000 (17:17 +0300)
Show in what memory control group the current shell is.

bin/cgmem_which [new file with mode: 0755]

diff --git a/bin/cgmem_which b/bin/cgmem_which
new file mode 100755 (executable)
index 0000000..81ef03f
--- /dev/null
@@ -0,0 +1,2 @@
+#! /bin/sh
+grep -Flw $$ /sys/fs/cgroup/*/tasks | cut -d/ -f5