Difference between revisions of "Is my ulimit exceeded"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 16: Line 16:
 
  file locks                      (-x) unlimited
 
  file locks                      (-x) unlimited
  
You can permanently set the limits in /etc/security/limits.conf for all users:
+
You can permanently set the limits in /etc/security/limits.conf. You will have to re-login afterwards. To set the number of file descriptors for all users, the syntax is:
 
  *                hard    nofile          10000
 
  *                hard    nofile          10000
 
  * soft    nofile          10000
 
  * soft    nofile          10000

Revision as of 06:27, 7 April 2009

Ulimit is a bash command that allows you to set and read shell restrictions (limits) like the maximum number of open files that are allowed for the user:

# ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 32768
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 32768
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

You can permanently set the limits in /etc/security/limits.conf. You will have to re-login afterwards. To set the number of file descriptors for all users, the syntax is:

*                hard    nofile           10000
*		 soft    nofile           10000