ulimit for cpu annd memory
Hi,
i wondering is there possibility to limit user resources (cpu and ram) with ulimit?
in /etc/profile to add limit like this:
so, this USERNAME cannot start more then 5 process ? tnx.
LIMITUSER=$USER
if [ -e "/usr/bin/whoami" ]; then
LIMITUSER=`/usr/bin/whoami`
fi
if [ "$LIMITUSER" != "USERNAME" ]; then
ulimit -n 10 -u 5 -m 200000 -d 200000 -s 8192 -c 200000 -v unlimited 2>/dev/null
else
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited
2>/dev/null
fi
so, this USERNAME cannot start more then 5 process ? tnx.
-
Hello, This question is likely better asked on forums where discussions of the OS occur, or on a third-party website such as: Thank you. 0
Please sign in to leave a comment.
Comments
1 comment