DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Using Ulimit To Limit

04.08.2005
| 6817 views |
  • submit to reddit
        I put this in 
profile.d/
:

 ####################
#limit amount of virtula memory, 
#CPU time and number of processes
#used by normal users.
#
if [ $UID -ge 500 ]
then
    ulimit -m 1000000
    ulimit -v 1000000
    ulimit -u 150
fi
#####################
 

With this script, I am able to survive http://www.bigbold.com/snippets/posts/show/78