Solved

File Open

Posted on 2000-05-14
9
191 Views
Last Modified: 2010-04-21
How can I specify how many files can be opened simultaneously ?

Andrew
0
Comment
Question by:andrewyu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2808509
What OS?
0
 
LVL 12

Expert Comment

by:geotiger
ID: 2809449
In Solaris, you can set it for a shell as

ulimit -n 64

If you want to set up for all the users, you need to change kernel settings in /etc/system.

0
 

Author Comment

by:andrewyu
ID: 2810888
How can I amend this setting in FreeBSD ?

Andrew
0
Independent Software Vendors: 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!

 

Accepted Solution

by:
nicob earned 30 total points
ID: 2810891
Hi,

To set the amount of users/processes in the /etc/system file you have to do the following :

set maxusers=<number>
set max_nprocs=<number>

Where <number> is you have to fill in the amount you want. You have to remember that max_nprocs is calculated in the following way :

10 + 16 * maxusers

To increase the number of file descriptors you have to put the following in the /etc/system file :

set rlim_fd_max=<number>

You require a reboot of the system after you have changed this in the /etc/system file.

Hope this answers your question.

Nico.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2811669
As I recall, on FreeBSD the number of open files is determined by the maxusers setting in the kernel config file and is twice the maximum number of processes. The default for the GENERIC kernel has maxusers=32 and since the maximum number of processes is 20+(16*maxusers), that yields a maximum number of open files of 1064. To raise the max open files limit you need to build a new kernel with a larger value for maxusers.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2813960
I've checked my assertion about the maximum number of openfiles in FreeBSD and in fact it is increaed by building a new kernel with a larger maxusers.
0
 

Author Comment

by:andrewyu
ID: 2814142
Thank you very much !

BUT, if the DEVIL told me the FILE TABLE IS FULL, do you think I can correct this problem by the solution provided by you ?

Andrew
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2815095
His solution is for Solaris and it will work if that is your OS. If it's BSD then it won't work.
0
 

Author Comment

by:andrewyu
ID: 2817915
So, it is a solutionfor SVR?, right ?

Anyway, where can I get resources regarding this issues ?

Andrew
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

729 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