Solved

File Open

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

Andrew
0
Comment
Question by:andrewyu
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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

910 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

21 Experts available now in Live!

Get 1:1 Help Now