1752782 Members
5891 Online
108789 Solutions
New Discussion юеВ

open files

 
SOLVED
Go to solution
heaman1
Regular Advisor

open files

last week , I use the command ulimit -n to set the open files to 10240 in my RH server , but todoy I found that this setting changed to 1024 , I wonder why this file will be changed to a lower value ? 10240 is the default value ?
how can I know what is my default value ? will the value be auto adjusted if the system detect the open files changes ?
3 REPLIES 3
Ivan Ferreira
Honored Contributor
Solution

Re: open files

You should increase your limits in the /etc/security/limits.conf file.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
heaman1
Regular Advisor

Re: open files

thx reply ,

so how can I know the current default setting ?
Mike Stroyan
Honored Contributor

Re: open files

The kernel's initial default value is 1024.
The ulimit 'command' is actually a shell builtin that uses setrlimit to set both the soft and hard limit for the shell process and its descendants. Only root can increase the hard limit. The new limit set by the shell don't affect processes that are not descendants of the shell. The new limits do not become any kind of default for the system.

The /etc/security/limits.conf settings are implemented by the pam_limits PAM module at login time. They are as close as you can get to increasing system default values.

You can see the current limits for all processes using
sudo grep 'Max open' /proc/*/limits