Using ulimit to limit
1 profile.d/:
1 #################### 2 #limit amount of virtula memory, 3 #CPU time and number of processes 4 #used by normal users. 5 # 6 if [ $UID -ge 500 ] 7 then 8 ulimit -m 1000000 9 ulimit -v 1000000 10 ulimit -u 150 11 fi 12 #####################
With this script, I am able to survive http://www.bigbold.com/snippets/posts/show/78