[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ulimits
Hi,
To limit resources under linux, you use ulimit. To see the
limits currently applying to you:
$ ulimit -a
core file size (blocks) 0
data seg size (kbytes) unlimited
file size (blocks) unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) 8192
cpu time (seconds) unlimited
max user processes 384
virtual memory (kbytes) unlimited
To modify these limits, you need to use pam_limits.so. You do
this by adding the following line to the pam.d configuration -
to apply over the whole system, you need login, ssh and gdm.
session required pam_limits.so
This will allow you to set limits in /etc/security/limits.conf.
You can do neat things like set limits for users and groups,
or set a default entry. The comments in the file should
be sufficient to explain the format. However, an example of
how we increased the limit on the number of processes a user
can run is:
* hard nproc 1000
Note that we seemed to need a 2.4 kernel to use this properly.
Thanks,
Brad
--
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
|Brad Marshall | Plugged In Software|
|Senior Systems Administrator | http://www.pisoftware.com|
|mailto:bmarshal@pisoftware.com | GPG Key Id: 47951BD0 / 1024b|
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
Fingerprint: BAE3 4794 E627 2EAF 7EC0 4763 7884 4BE8 4795 1BD0