• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 489
  • Last Modified:

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

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
0
aixtutorial
Asked:
aixtutorial
  • 2
  • 2
1 Solution
 
farzanjCommented:
You are probably trying PAM.

Try tuning kernel parameters as follows

http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/
0
 
Kerem ERSOYPresidentCommented:
Hi,

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.

Cheers,
K.



0
 
Kerem ERSOYPresidentCommented:
Opps this line:

The max number is 655535.

should read:

The max number is 65535. (for 32 bit systems)
0
 
farzanjCommented:
@KeremE
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.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now