[comp.sys.att] Changing ulimit on 3b2/600

cgw@cadre.dsl.PITTSBURGH.EDU (Gray Watson) (04/15/88)

Hi all:
	I'm trying to change the sh's ulimit from 2048 blocks (1 Meg) to
some large value.  Sure I can do it for root but that doesn't help our
big database users.

	I found an entry in the /etc/master.d/kernel file and changed it
but don't know how to make the 3b2/600 rebuild the kernel using the
new value.

	Any help with this problem is appreciated!!

thanx...
gray watson
cgw@cadre.dsl.pittsburgh.edu

wtr@moss.ATT.COM (04/16/88)

In article <1122@cadre.dsl.PITTSBURGH.EDU> cgw@cadre.dsl.pittsburgh.edu.UUCP (Gray Watson) writes:

>	I'm trying to change the sh's ulimit from 2048 blocks (1 Meg) to
>some large value.  Sure I can do it for root but that doesn't help our
>big database users.
>

We have a routine here on our vaxen called ulimit++,
which is basically a short C program which checks the 
current ulimit, and if it is less than a specific value
(8 Meg in our case), it creates a user shell calling ulimit() 
to raise the ulimit in the new shell.

The program is suid'd to root ( naturally, in order to invoke
ulimit() ), but I've never heard of any security problems with it.

Its about 40 lines of source, but I'll have to check on it's 
'proprietaryness' before posting it.  You can probably write
your own, its a fairly simple to implement.  And it has the 
advantage of raising the ulimit only when you need it, and
you dont have to patch the kernal.

Good luck,

=====================================================================
Bill Rankin
Bell Labs, Whippany NJ
(201) 386-4154 (cornet 232)

email address:		...![ ihnp4 ulysses cbosgd allegra ]!moss!wtr
			...![ ihnp4 cbosgd akgua watmath  ]!clyde!wtr
=====================================================================

paddock@mybest.UUCP (Steve Paddock) (04/16/88)

In article <1122@cadre.dsl.PITTSBURGH.EDU> cgw@cadre.dsl.pittsburgh.edu.UUCP (Gray Watson) writes:
>Hi all:
>
>	I found an entry in the /etc/master.d/kernel file and changed it
>but don't know how to make the 3b2/600 rebuild the kernel using the
>new value.
>

cd /boot
mkboot -k KERNEL
touch /etc/system
shutdown -y -g0 -i6

Steve



-- 
Steve Paddock  ut-emx!mybest!paddock 
	       or uunet!bigtex!mybest!paddock
	       or paddock@auscso.UUCP

psfales@iwfap.ATT.COM (Peter Fales) (04/17/88)

In article <1122@cadre.dsl.PITTSBURGH.EDU>, cgw@cadre.dsl.PITTSBURGH.EDU (Gray Watson) writes:
> 
> 	I found an entry in the /etc/master.d/kernel file and changed it
> but don't know how to make the 3b2/600 rebuild the kernel using the
> new value.

When the system is booted, it will rebuild the kernel if the time
stamp on /etc/system is more recent than on /unix.  You must also
have rebuilt the KERNEL module in /boot.

There are different ways to do this, but the following steps seem
easiest for me to remember:

# cd /boot
# mkboot -k KERNEL
# touch /etc/sytem
# sysadm reboot


-- 
Peter Fales		UUCP:	...ihnp4!ihlpe!psfales
			work:	(312) 979-7784
				AT&T Information Systems, IW 1Z-243
				1100 E. Warrenville Rd., IL 60566

lenny@icus.UUCP (Lenny Tropiano) (04/18/88)

In article <1122@cadre.dsl.PITTSBURGH.EDU> cgw@cadre.dsl.pittsburgh.edu.UUCP (Gray Watson) writes:
|>Hi all:
|>	I'm trying to change the sh's ulimit from 2048 blocks (1 Meg) to
|>some large value.  Sure I can do it for root but that doesn't help our
|>big database users.
|>
|>	I found an entry in the /etc/master.d/kernel file and changed it
|>but don't know how to make the 3b2/600 rebuild the kernel using the
|>new value.
|>
|>	Any help with this problem is appreciated!!
|>

Do the following as root:

# vi /etc/master.d/kernel		! change tuneable parameters
# cd /
# cp unix oldunix			! good idea to save just in case
# cd /boot
# mkboot -k KERNEL			! make a new kernel
# cd /
# shutdown -g0 -i5 -y			! go to firmware

FIRMWARE MODE

Enter program ... 		/etc/system

Load device is the HD (hard disk)

A new unix will be configured... and loaded.

-Lenny
-- 
US MAIL  : Lenny Tropiano, ICUS Computer Group        IIIII  CCC U   U  SSS
           PO Box 1                                     I   C    U   U S
	   Islip Terrace, New York  11752               I   C    U   U  SS 
PHONE    : (516) 968-8576 [H] (516) 582-5525 [W]        I   C    U   U    S
TELEX    : 154232428 [ICUS]                           IIIII  CCC  UUU  SSS 
AT&T MAIL: ...attmail!icus!lenny  
UUCP     : ...{mtune, ihnp4, boulder, talcott, sbcs, bc-cis}!icus!lenny 

friedl@vsi.UUCP (Stephen J. Friedl) (04/19/88)

In article <348@icus.UUCP>, lenny@icus.UUCP (Lenny Tropiano) writes:
< [How do I raise the ulimit on a 3B2?]
< Do the following as root:
< 
< # vi /etc/master.d/kernel		! change tuneable parameters
< # cd /
< # cp unix oldunix			! good idea to save just in case
< # cd /boot
< # mkboot -k KERNEL			! make a new kernel
< # cd /
< # shutdown -g0 -i5 -y			! go to firmware
< 
< FIRMWARE MODE

As an aside, mkboot(1m) on a 3B2 and 3B5 takes an additional,
undocumented "-x" option that prints lots of debug info --
it basically dumps the system's configuration information
as it processes it.  "mkboot -x -k KERNEL" works for me all
the time.

-- 
Steve Friedl   V-Systems, Inc.  Wizard of undocumented 3B options
friedl@vsi.com    {backbones}!vsi.com!friedl   attmail!vsi!friedl

lenny@icus.UUCP (Lenny Tropiano) (04/20/88)

In article <24951@clyde.ATT.COM> wtr@moss.UUCP (Bill Rankin) writes:
|>In article <1122@cadre.dsl.PITTSBURGH.EDU> cgw@cadre.dsl.pittsburgh.edu.UUCP (Gray Watson) writes:
|>
|>>	I'm trying to change the sh's ulimit from 2048 blocks (1 Meg) to
|>>some large value.  Sure I can do it for root but that doesn't help our
|>>big database users.
|>>
|>
|>We have a routine here on our vaxen called ulimit++,
|>which is basically a short C program which checks the 
|>current ulimit, and if it is less than a specific value
|>(8 Meg in our case), it creates a user shell calling ulimit() 
|>to raise the ulimit in the new shell.
|>
...
Under UNIX System V release 3.1, ULIMIT is a tunable parameter and
can be set within /etc/master.d/kernel.  You can raise it for every
UNIX process on the system (permenantly!)...

								-Lenny

-- 
US MAIL  : Lenny Tropiano, ICUS Computer Group        IIIII  CCC U   U  SSS
           PO Box 1                                     I   C    U   U S
	   Islip Terrace, New York  11752               I   C    U   U  SS 
PHONE    : (516) 968-8576 [H] (516) 582-5525 [W]        I   C    U   U    S
TELEX    : 154232428 [ICUS]                           IIIII  CCC  UUU  SSS 
AT&T MAIL: ...attmail!icus!lenny  
UUCP     : ...{mtune, ihnp4, boulder, talcott, sbcs, bc-cis}!icus!lenny 

dwc@homxc.UUCP (Malaclypse the Elder) (04/20/88)

> In article <348@icus.UUCP>, lenny@icus.UUCP (Lenny Tropiano) writes:
> [How do I raise the ulimit on a 3B2?]
> Do the following as root:
>
> # vi /etc/master.d/kernel		! change tuneable parameters
> # cd /
> # cp unix oldunix			! good idea to save just in case
> # cd /boot
> # mkboot -k KERNEL			! make a new kernel
> # cd /
> # shutdown -g0 -i5 -y			! go to firmware
>
> FIRMWARE MODE
> 
another approach is to wrap a shell around the process that
you want the increased ulimit with a call to "ulimit" to increase
the ulimit.

on my 3b2 for example, i changed /etc/inittab to run what i call
"bigetty".  bigetty is simply a shell that looks like:

ulimit XXXX
/etc/getty $*

this allows the added flexibility/headache of giving different
users different ulimits.

danny chen
homxc!dwc

pim@ctisbv.UUCP (Pim Zandbergen) (04/25/88)

In article <1977@homxc.UUCP> dwc@homxc.UUCP (Malaclypse the Elder) writes:
:another approach is to wrap a shell around the process that
:you want the increased ulimit with a call to "ulimit" to increase
:the ulimit.
:
:on my 3b2 for example, i changed /etc/inittab to run what i call
:"bigetty".  bigetty is simply a shell that looks like:
:
:ulimit XXXX
:/etc/getty $*

Another way to do this is to put something like this in your inittab file:

24:234:respawn:sh -c 'ulimit XXXX; exec /etc/getty tty24 38400'

This also saves you from running two shells.

-- 
--------------------+------------------------------------+---------------------
Pim Zandbergen      | CTI Software BV                    | Phone: +31 70 542302 
pim@ctisbv.UUCP     | Laan Copes van Cattenburch 70      | Fax:   +31 70 512837
..!mcvax!ctisbv!pim | 2585 GD The Hague, The Netherlands | Telex: 32133 CTI NL