[SunHELP] Max file number that Solaris can open

Dale Ghent sunhelp at sunhelp.org
Thu Apr 12 11:40:06 CDT 2001


On Thu, 12 Apr 2001, baki wrote:

| Hi ;
|
| I have two question
|
| 1. How can i learn the max file number which Solaris 2.6/7 can open
|
| 2. And How can i increase thi number?

To get the limits (soft and hard limits)

/usr/bin/ulimit -n	(soft limit)
/usr/bin/ulimit -H -n	(hard limit)

To change them:

Any user can set the soft limit up to the hard limit for their session,
but only root can increase the system hard limit. On solaris, the default
soft limit is 256, and the default hard limit is 1024.

To change these defaults, edit /etc/system and add the following lines:

* Increase system file descriptor limits
set rlim_fd_cur = 256
set rlim_fd_max = 4096

The first one sets the soft limit (the example actually keeps it at the
default) and the second line icreases the default hard limit from 1024 to
4096.

Reboot the system for the changes to take effect.

/dale




More information about the SunHELP mailing list