Operating System - Linux
1828354 Members
2943 Online
109976 Solutions
New Discussion

Re: How to set soft limit ?

 
Vitaly Karasik_1
Honored Contributor

How to set soft limit ?

I need to increase soft limit for open files per process.

root can do it with "ulimit -n 10240", for example.
In order to increase this limit for all users, I used /etc/initscripts few years ago.

I've tried to put ulimit command to /etc/initscript in RH7.3 and 8.0, but it doesn't work.

any ideas?
4 REPLIES 4
U.SivaKumar_2
Honored Contributor

Re: How to set soft limit ?

Hi,

put your ulimit command in /etc/rc.d/rc.local file for executing evrytime system boots.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Vitaly Karasik_1
Honored Contributor

Re: How to set soft limit ?

already tried, and it doesn't work...
Stuart Browne
Honored Contributor

Re: How to set soft limit ?

I don't suppose you've tried throwing it in /etc/profile ?
One long-haired git at your service...
Vitaly Karasik_1
Honored Contributor

Re: How to set soft limit ?

As far as I see, *root* can use "ulimit -Sn xxxx" or even "ulimit -n xxxx" from command line/profile/bash_profile/rc.local/and so on ,

but

*regular user* can's run ulimit from command line or profile and rc.local/initscript for some reason don't affect regular user.

As far as I remember, /etc/initscript [see man initscript] is "the place" for putting system-wide ulimit settings, and it worked for me few years ago.