Friday 6 October 2017

Using "ulimit" to check the processes allocated to a specific UNIX user

Example:

 > ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 579302
max locked memory       (kbytes, -l) 40960000
max memory size         (kbytes, -m) unlimited
open files                      (-n) 524288
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 16384
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited


As a bonus, we can even increase this limit without root, as long as is under the "hard" limit:

Add: ulimit –u 16384  
in the file .bash_profile

To check the "hard limit", run:

>ulimit -aH