It is currently Fri, 15 Oct 2021 21:19:39 GMT



 
Author Message
 increasing ulimit?
Is it possible to increase ones ulimit from its current level?
I am interested on having this done for all users not just root.  I also
would want to be able to do this on a permanent basis.  Is this possible?
If so, how?  

Thanks in advance foir any help on this matter.
--
I can accept e-mail and Voice-mail at:
tbaas!tom      or   tom@tbaas      or  ....marque!tomb  or  tomb@marque
or Voice at: 1-414-377-4038



 Thu, 03 Mar 1994 10:30:15 GMT   
 increasing ulimit?

This all depends upon whos version of system V you are running.  Only root
can raise the default value, but the kernel can be built with a higher
default value and on some systems login(1) will use a default specified in
/etc/default/login (although I recommend strongly against using this mechanism).

Tell us what you are running.
--
I guess these are the views of VTI - since it is my consulting company.

Conor P. Cahill              (703)430-9247              uunet!virtech!cpcahil
Virtual Technologies, Inc.  46030 Manekin Plaza            Sterling, VA 22170



 Thu, 03 Mar 1994 23:32:25 GMT   
 increasing ulimit?
In article <1991Sep15.153225.23...@virtech.uucp> cpca...@virtech.uucp (Conor P. Cahill) writes:

I have a slightly different question.  How can I raise the
ulimit for individual users without raising the default?
ISC V.3.2.2.1

Thanks!

Andy
--
If I bounce, PLEASE send a copy of the *whole* message including
the headers, to an...@stb.info.com.  I occasionally bounce my own mail.
Please help me to localize the problem.  Thank you.
P.S.  100K limit on messages to me.



 Sat, 05 Mar 1994 07:19:28 GMT   
 increasing ulimit?

No can do. (with existing tools, that is)

This could be handled by a C setuid-root program that looks up the
user in a datafile (probably in /etc), sets the appropriated ulimit,
does a setuid(getuid()) (to give up setuid root privs) and then exec's
the real login shell (note this is the shell, not login) for the user.
Also note that it is a straight exec, not a fork.

The user's /etc/passwd entry would be changed to reflect this new
program as the login shell.  

--
I guess these are the views of VTI - since it is my consulting company.

Conor P. Cahill              (703)430-9247              uunet!virtech!cpcahil
Virtual Technologies, Inc.  46030 Manekin Plaza            Sterling, VA 22170



 Sat, 05 Mar 1994 18:55:00 GMT   
 increasing ulimit?
   Is it possible to increase ones ulimit from its current level?
   I am interested on having this done for all users not just root.  I also
   would want to be able to do this on a permanent basis.

Only root can raise a ulimit.  But there's a means below (which I had
placed in the GNU Emacs distribution a few years back) which will
cause the initial ulimit to be altered to something huge at boot time.

As the comments say, you don't need this if you live under V.3 or
later; you can reconfigure your kernel directly for a larger limit.

Note caveat!  This script is not idempotent!  _Don't_ run it twice!

--karl

#!/bin/sh
#
# ulimit.hack: Create an intermediate program for use in
# between kernel initialization and init startup.
# This is needed on a 3b system if the standard CDLIMIT is
# so small that the dumped Emacs file cannot be written.
# This program causes everyone to get a bigger CDLIMIT value
# so that the dumped Emacs can be written out.
#
# Users of V.3.1 and later should not use this; see etc/MACHINES
# and reconfig your kernel's CDLIMIT parameter instead.
#
# Caveat: Heaven help you if you{*filter*}this up.  This puts
# a new program in as /etc/init, which then execs the real init.
#
cat > ulimit.init.c << \EOF
main(argc, argv)
int argc;
char *argv[];
{
        ulimit(2, 262144L);     /* "2" is the "set" command. */
        /* 262,144 allows for 128Mb files to be written. */
        /* If that value isn't suitable, roll your own.  */
        execv("/etc/real.init", argv);
EOF
#
# Compile it and put it in place of the usual init program.
#
cc ulimit.init.c -o ulimit.init
mv /etc/init /etc/real.init
mv ulimit.init /etc/ulimit.init
ln /etc/ulimit.init /etc/init
mv ulimit.init.c /etc/ulimit.init.c     # to keep src for this hack nearby.
chmod 0754 /etc/init
exit 0
#
# Upon system reboot, all processes will inherit the new large ulimit.



 Sun, 06 Mar 1994 00:54:28 GMT   
 
   [ 5 post ] 

Similar Threads

1. increasing Ulimits for Oracle user in a VxFS oracle implementation

2. increasing ulimit for core files

3. How to increase ULIMIT

4. How to increase ulimit for users (BSD 4.4)?

5. increasing ulimit

6. "at" command doesn't work after increasing ulimit, HELP Please!

7. ulimit in hp-ux: how to increase?

8. Why throughput increases as MTU size is increased

9. ulimit does not increase the datasegment limit to 4gb.

10. setrlimit (ulimit) bug? Cannot ulimit -c!


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software