Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Amending Max No of Files (ulimit)!!! 1

Status
Not open for further replies.

csunix

Programmer
Mar 23, 2004
129
GB
I wish to permenantly set the maximum number of open files available to the
current shell and its descendents (as seen when you type in the "ulimit -a") on
a server. Can someone please help / tell me how to do this. Note that I
can change this value but when I log out and log back in the value goes back to its
original value.
 
Thanks Iribach.
Does this permanently set it?
I was reading the 'Man' page on ulimit and it suggests a command of ulimit -n ###, which should then set the new limit. It does that then, but then after logging out and back in again it resets itself back to it's original value!!!
 
commands are always volatile (o, there are some, who...), after logout or reboot the value is reset to default; if you want to set something persistant you have to add it to the rc-files...

excerpt from "man login"
...
For Bourne shell and Korn shell logins, the shell executes
/etc/profile and $HOME/.profile, if it exists. For C shell
logins, the shell executes /etc/.login, $HOME/.cshrc , and
$HOME/.login . The default /etc/profile and /etc/.login
files check quotas (see quota(1M)), print /etc/motd, and
check for mail. None of the messages are printed if the file
$HOME/.hushlogin exists. The name of the command inter-
preter is set to - (dash), followed by the last component of
the interpreter's path name, for example, -sh.
...

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
It sounds like you need to add a couple of entries in the "System Specification File" /etc/system in the "set:" section, at the end of the file. For example:
set rlim_fd_cur=2048
set rlim_fd_max=2048
to increase the "open files" to 2048.

A reboot will be required for the values to take effect. But before you do it, check out the "Solaris Tunable Parameters Reference Manual" or search Google for: "Solaris 8" + "rlim_fd_cur" + limit

I hope that helps.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top