This is RHEL Linux 5.0..nned to make the ulimit value ulimited

Posted on 2011-05-09
Last Modified: 2012-08-14
This is RHEL Linux 4.0.ned to make the ulimit value ulimited for no .of open files

when tried setting it up to unlimited on limits.conf.The users are not able to log in..What is the max value that can be set on a user for open files in linux..and the application is mibehaving because of the value beingtoo small..Please let me know as whats the max value that we can set on it..and also please let me know if we can set that max value in users .bash_profile
Question by:aixtutorial
    LVL 31

    Expert Comment

    You are probably trying PAM.

    Try tuning kernel parameters as follows
    LVL 30

    Expert Comment

    by:Kerem ERSOY

    First of all mumber of open files (mazimum open files by the user) and ulimit (set limit for the process itself) it has nothing to do with open files at all.

    So it seems to me that what you want to do is to limit number of files taht could be open by any user. If you want to do it on user or group basis you can use /etc/security/limits.conf. The syntax should be:

    username     soft     nofile  1024
    username     hard    nofile  65535
    anotheruser  soft     nofile   1024
    anotheruser  hard    nofile  32768

    Then  increase it in /etc/sysctl.conf

    fs.file-max = 65536

    will do it. Don't forget to issue "sysctl -p" after you quit edthe editor.

    Then you can add this to your users .bash_profile:
    ulimit -u 16384 -n 65536

    The max number is 655535.


    LVL 30

    Accepted Solution

    Opps this line:

    The max number is 655535.

    should read:

    The max number is 65535. (for 32 bit systems)
    LVL 31

    Expert Comment

    I believe:

    2^16-1=65536-1 =65535 (16 bit)

    >>First of all mumber of open files (mazimum open files by the user) and ulimit (set limit for the process itself) it has nothing to do with open files at all.

    So as I understand from your statement that maximum # of user files,  max number of process files and maximum number of open files are three totally different things.  Please explain, because I thought these should have been two categories not three--or may be I am forgetting something.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap ( Version 1.2 2.      Jpcap( Version 0.6 Prerequisite: 1.      GCC …
    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now