Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I set sysctl fs.file-max = 4500000. However, ulimit still shows open files (-n) 1024

I understand that both values point to the max open file descriptors. How do I make ulmit respect the sysctl value?

Is there any documentation on the meanings of the various values of sysctl?

share|improve this question

1 Answer 1

if what you are looking for is a permanent set to the ulimit, you'll want to add the line

ulimit -n 4500000

to /etc/profile (source /etc/profile afterwards to see change).

As for finding the meaning of systctl, you can find detailed information here:

http://www.kernel.org/doc/Documentation/sysctl/

share|improve this answer
1  
Not quite. You are better off setting the value in /etc/security/limits.conf (depending on distro). While setting it in /etc/profile will work, the next sysadmin to come after you won't be expecting it there. –  devicenull Apr 12 '11 at 1:44
    
I've tried setting in /etc/security/limits.conf but could not get ulimit -n to return what I set in the file. Is there an extra step I was missing? –  Quinn Murphy Apr 12 '11 at 2:15
    
Did you log out and log back in? The values in limits.conf are only applied during new logins. –  devicenull Apr 12 '11 at 3:48
    
i did logout and log back in. I'll take a look at it again though. Thanks for your help! –  Quinn Murphy Apr 12 '11 at 4:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.