Number of Files Opened
Linux allows you to control how many opened file descriptor an user can have at any one time.
To show the number of files opened on a system, run:
# cat /proc/sys/fs/file-nr 1536 0 793120
The fields are:
- Current number of opened files
- Number of free allocated file descriptors
- Maximum number of file descriptors for the whole system
You may change this value by:
# cat <new value> > /proc/sys/fs/file-nr ## Edit <code>/etc/sysctl.conf</code> so that there is a line ## fs.file-max = <new value>
You can see the limits set by running
ulimit on the bash shell.
# ulimit -n
You can also see the per-user limits defined in
# cat /etc/security/limits.conf