ulimit mostra o máximo por processo. Os dois arquivos em /proc mostram números de todo o sistema.
De ServerFault :
file-maxis the maximum File Descriptors (FD) enforced on a kernel level, which cannot be surpassed by all processes without increasing. Theulimitis enforced on a process level, which can be less than thefile-max.
De link :
What is the
file-maxparameter and what should we tune it to? The linux documentation definition is thatfile-maxdenotes the maximum number of filehandles that the Linux kernel will allocate.[...]
How do I know if I’m getting close to hitting this limit on my server? Run the command:
cat /proc/sys/fs/file-nr. This will return three values, denote the number of allocated file handles, the number of allocated but unused file handles, and the maximum number of file handles. Note thatfile-nrIS NOT a tunable parameter. It is informational only. On my server, this returns:3488 0 793759. This means that currently, my server has only allocated 3488 of the 793,759 allocation limit and is in no danger of hitting this limit at this time.