www.LinuxHowtos.org

edit this article

Using ulimit

This tip introduces ulimit -- a command to define system resource limits. As a user, you can create self-imposed limits to prevent processes from taking up too much CPU time or memory.

To view all available resource limits, type ulimit -a. This command shows the limits the system administrator has imposed on your account. You can lower these limits, but you can't increase them. Many accounts will have 'unlimited' listed. If so, here are some useful things you can do with ulimit:

Code Listing 1: Preventing core files

% ulimit -c 0

Code Listing 2: Preventing Files larger than 25 MB

% ulimit -f 25600

Since ulimit is a builtin shell command, see your shell manual page for more information (e.g. man bash, man zsh, etc.).

Note:

System administrators can impose system-wide limits using /etc/limits. See man limits for more information.

From http://www.gentoo.org/news/en/gwn/20040322-newsletter.xml


rate this article:
current rating: average rating: 1.2 (117 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back