Solved

File Open

Posted on 2000-05-14
9
185 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
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

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

707 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