]> git.phdru.name Git - dotfiles.git/blobdiff - bin/cgmem_nice
Fix(bin/cp_recode_fname): Fix misspelled message
[dotfiles.git] / bin / cgmem_nice
index b36a6c5e142638f63c9ffa81d79ef0147ad1ae18..aa8eecc0e1e20b15cf8e2b1c6c7b1e25d1b920ff 100755 (executable)
@@ -1,12 +1,12 @@
 #! /bin/sh
 
 usage() {
-   echo "Usage: $0 {100|200|300|500|1000|2000|4000} [command [args]]"
+   echo "Usage: $0 {100|200|300|400|500|1000|2000|4000|5000} [command [args]]"
    exit 1
 }
 
 case "$1" in
-   100|200|300|500|1000|2000|4000)
+   100|200|300|400|500|1000|2000|4000|5000)
    ;;
 
    *) usage
@@ -16,8 +16,8 @@ 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
-exec nice -20 ionice -c3 "${@:-$SHELL}"
+exec nice -20 ionice -c3 "${@:-$SHELL}"