The shell contains a built-in command to limit file sizes, ulimit, which can also be used to display limitations on system resources. A second method for limiting the potential impact of runaway processes is to set limits on a per process basis. This can be achieved by setting the ulimit command in /etc/profile.
The ulimit command allow to limit system-wide resource use. This can help a lot in system administration, e.g. when a user starts too many processes and therefore makes the system unresponsive for other users.
-bash-3.00$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
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) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 274432
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
-bash-3.00$
Let's say, if you got an error like - Configuration Error: nofiles is set to '1024' but minimum required is '2048' then you can change using the below command -
-bash-3.00$ ulimit -n 4096
No comments:
Post a Comment