[CentOS] ulimit [SOLVED]

Sun Apr 11 03:08:43 UTC 2010
Keith Keller <kkeller at wombat.san-francisco.ca.us>

On Sun, Apr 11, 2010 at 03:25:47AM +0100, Miguel Medalha wrote:
> 
> > I need to to change the ulimit to 16384(ulimit -n 16384) on boot on
> > Centos 5.4 64 bit.  How do I do that?
> 
> After replying to you, I tested the "solution" I gave you and it didn't 
> work.
> 
> I found a working solution. I added the following line to /etc/profile:
> 
> ulimit -n 16384

It's not clear from the OP's original post whether this will work for
his purposes or not.  My guess (which I can't substantiate, since I
don't have a box which I can reboot to test) is that the entry in
/etc/profile may not be applied to the init scripts, so (for example) if
he wanted httpd limited the /etc/profile entry may not be sufficient.

Matt, perhaps you could provide more details, on which processes you
desire to have this ulimit, and why.  The more specific you can get the
better quality answers you'll receive.

> I know it works because I just tested it and it survived the server's 
> reboot. I ran "ulimit -a" and the new value was there.

...from a login shell.  If you don't have a login shell /etc/profile
isn't read on bash startup.

--keith

-- 
kkeller at speakeasy.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20100410/fcaf1bbb/attachment-0004.sig>