I modified /etc/security/limits.conf.
I can manually raise the number of file descriptors using ulimit -n. I can put that command in /etc/profile or similar.
How can I avoid /etc/profile or similar shell modifications and just have ulimit -n show the right limit from the start?
# fgrep nofile /etc/security/limits.conf
* - nofile 16384
# egrep '__FD_SETSIZE.*16384' /usr/include/*/*h
/usr/include/bits/typesize
s.h:#defin
e __FD_SETSIZE 16384
/usr/include/linux/posix_t
ypes.h:#de
fine __FD_SETSIZE 16384
# fgrep pam_limits /etc/pam.d/*
/etc/pam.d/atd:session required pam_limits.so
/etc/pam.d/cron:session required pam_limits.so
/etc/pam.d/login:session required pam_limits.so
/etc/pam.d/login:session required /lib/security/pam_limits.s
o
/etc/pam.d/ssh:session required pam_limits.so
/etc/pam.d/ssh:session required /lib/security/pam_limits.s
o
/etc/pam.d/su:session required pam_limits.so
# uname -a
Linux clt 2.6.22-14-generic #1 SMP Tue Feb 12 07:00:00 UTC 2008 i686 GNU/Linux
The first two changes above were enough to raise the limit permanently on Ubuntu Dapper, but I cannot find a way to do that (without shell) on Gutsy.
I login as root via ssh, but that should not matter.
Thank you.
Start Free Trial