Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SCO OSR5.0.4 TCPIP and system crashes once per day

0 views
Skip to first unread message

TT

unread,
Mar 31, 1998, 3:00:00 AM3/31/98
to

Hi,

We are using SCO OSR5.0.4 enterprise system as our webserver on HP
Netserver 5/100 LS w. 128M memory and 3com 3c905-tx. Patches,
implemented to the system: rs504c, oss470a, oss465b, oss467a.2, oss473a,
oss459a.
System crashes at night or morning, not at some particular time but
periodically every night, usually we notice this from dead ip. Logging
in from console is quite painful, because something has drained almost
all system resources and it takes five to ten minutes to get the shell
prompt... Once I found around 40-50 cron and dlvr_audit processes, when
I managed to log in, but it's not the case every time - at some hangs I
have not noticed any particular changes from "usual" process list.

By now, I have consumed all my supply of ideas... :( so, any help would
be GREATLY appreciated.

-Tm-


TT

unread,
Mar 31, 1998, 3:00:00 AM3/31/98
to

TT wrote:

After writing the message I thought, that adding the output of hwconfig
and swconfig would be also good idea... Though the latter is quite long...

name=cpu vec=- dma=- unit=1 family=5 type=Pentium
name=cpuid vec=- dma=- unit=1 vend=GenuineIntel step=C2
name=fpu vec=13 dma=- unit=1 type=80387-compatible
name=eisarom vec=- dma=- eisa (1.3.0)
name=pci base=0xCF8 offset=0x7 vec=- dma=- am=1 sc=0 buses=2
name=serial base=0x3F8 offset=0x7 vec=4 dma=- unit=0 type=Standard nports=1
fifo=yes
name=console vec=- dma=- unit=vga type=0 12 screens=68k
name=adapter base=0xFC00 offset=0xFF vec=10 dma=- type=alad ha=0 bus=0 id=7
fts=sto
name=adapter base=0xF400 offset=0xFF vec=14 dma=- type=alad ha=1 bus=0 id=7
fts=sto
name=floppy base=0x3F2 offset=0x5 vec=6 dma=2 unit=0 type=135ds18
name=kbmouse base=0x60 offset=0x4 vec=12 dma=- type=Keyboard mouse
name=e3H base=0xF8C0 offset=0x1F vec=11 dma=- 3Com 3C90x, unit=0
name=cd-rom vec=- dma=- type=S ha=0 id=5 lun=0 bus=0 ht=alad
name=chey vec=- dma=- type=S ha=0 id=0 lun=0
name=disk vec=- dma=- type=S ha=0 id=0 lun=0 bus=0 ht=alad
name=Sdsk vec=- dma=- cyls=2033 hds=64 secs=32 fts=stdb
name=disk vec=- dma=- type=S ha=0 id=1 lun=0 bus=0 ht=alad
name=Sdsk vec=- dma=- cyls=2033 hds=64 secs=32 fts=stdb
name=disk vec=- dma=- type=S ha=0 id=3 lun=0 bus=0 ht=alad
name=Sdsk vec=- dma=- cyls=4067 hds=64 secs=32 fts=stdb

Set Release Notes
--- ------- -----
SCO UNIX System V Operating Syst 5.0.4Eb partially installed
Release Supplement for SCO O rs.Unix50 applied
RS504C Unix Supplement rs.Unix50 applied
Release Supplement for SCO OpenS rs.Unix50 loaded
RS504C Unix Supplement rs.Unix50 loaded
SCO System V Link Kit 1.1.0Eb installed
COFF Linker Supplement OSS459A applied
RS504C Link-Kit Supplement rs.link11 applied
Pentium Errata Supplement fo oss470a.l applied
COFF Linker Supplement OSS459A loaded
RS504C Link-Kit Supplement rs.link11 loaded
Pentium Errata Supplement for SC oss470a.l loaded
Extended Tcl 7.3.2b installed
Visual Tcl 5.1.2b installed
RS504C Widget Server Supplem rs.WServe applied
RS504C Widget Server Supplement rs.WServe loaded
Administration Framework 1.0.0Bd installed
Software Manager 1.0.1a installed
RS504C Software Manager Supp rs.SoftMg applied
RS504C Software Manager Suppleme rs.SoftMg loaded
Network Configuration Manager 5.0.4d installed
RS504C Network Configuration rs.lli504 applied
RS504C Network Configuration Man rs.lli504 loaded
SCO Mail User Agents 1.0.3a installed
OSS465B: ScoMail Supplement oss465b.M applied
OSS465B: ScoMail Supplement oss465b.M loaded
Software Manager English Languag 1.0.1a installed
SCO OpenServer Dsk Driver 5.2.1Eb installed
SCO OpenServer Scfg Driver 5.2.1Eb installed
SCO OpenServer Sdsk Driver 5.2.1Eb installed
SCO OpenServer Sflp Driver 5.2.1Eb installed
SCO OpenServer Sjk Driver 5.2.1Eb installed
RS504C Sjk Driver Supplement rs.Sjk521 applied
RS504C Sjk Driver Supplement rs.Sjk521 loaded
SCO OpenServer Srom Driver 5.2.1Eb installed
RS504C Srom Driver Supplemen rs.Srom52 applied
RS504C Srom Driver Supplement rs.Srom52 loaded
SCO OpenServer Stp Driver 5.2.1Eb installed
SCO OpenServer ad Driver 5.2.1Eb installed
SCO OpenServer Alad Driver 5.2.1Eb installed
SCO OpenServer Ams Driver 5.2.1Eb installed
SCO OpenServer Arad Driver 5.2.1Eb installed
SCO OpenServer Blc Driver 5.2.1Eb installed
SCO OpenServer busmouse Driver 5.2.1Eb installed
SCO OpenServer cga Driver 5.2.1Eb installed
SCO OpenServer ciha Driver 5.2.1Eb installed
SCO OpenServer cpqs Driver 5.2.1Eb installed
SCO OpenServer Ct Driver 5.2.1Eb installed
SCO OpenServer Dptr Driver 5.2.1Eb installed
SCO OpenServer efp Driver 5.2.1Eb installed
SCO OpenServer ega Driver 5.2.1Eb installed
SCO OpenServer eiad Driver 5.2.1Eb installed
SCO OpenServer Esdi Driver 5.2.1Eb installed
SCO OpenServer fd Driver 5.2.1Eb installed
SCO OpenServer fdhb Driver 5.2.1Eb installed
SCO OpenServer fl5 Driver 5.2.1Eb installed
SCO OpenServer flashpt Driver 5.2.1Eb installed
SCO OpenServer ft Driver 5.2.1Eb installed
SCO OpenServer hf Driver 5.2.1Eb installed
SCO OpenServer ida Driver 5.2.1Eb installed
SCO OpenServer ida0 Driver 5.2.1Eb installed
SCO OpenServer ida1 Driver 5.2.1Eb installed
SCO OpenServer ida2 Driver 5.2.1Eb installed
SCO OpenServer ida3 Driver 5.2.1Eb installed
SCO OpenServer ida4 Driver 5.2.1Eb installed
SCO OpenServer ida5 Driver 5.2.1Eb installed
SCO OpenServer Iiop Driver 5.2.1Eb installed
RS504C Iiop Host Adapter Dri rs.Iiop52 applied
RS504C Iiop Host Adapter Driver rs.Iiop52 loaded
SCO OpenServer ims Driver 5.2.1Eb installed
SCO OpenServer ir Driver 5.2.1Eb installed
SCO OpenServer kbmouse Driver 5.2.1Eb installed
SCO OpenServer mdac Driver 5.2.1Eb installed
SCO OpenServer mono Driver 5.2.1Eb installed
SCO OpenServer ncr Driver 5.2.1Eb installed
SCO OpenServer omti Driver 5.2.1Eb installed
SCO OpenServer pa Driver 5.2.1Eb installed
SCO OpenServer Piiop Driver 5.2.1Eb installed
SCO OpenServer Smad Driver 5.2.1Eb installed
SCO OpenServer sumo Driver 5.2.1Eb installed
SCO OpenServer tmcha Driver 5.2.1Eb installed
SCO OpenServer tpic Driver 5.2.1Eb installed
SCO OpenServer vga Driver 5.2.1Eb installed
SCO OpenServer Wd Driver 5.2.1Eb installed
RS504C Wd Host Adapter Drive rs.Wd521. applied
RS504C Wd Host Adapter Driver Su rs.Wd521. loaded
SCO OpenServer wdex Driver 5.2.1Eb installed
SCO OpenServer wdha Driver 5.2.1Eb installed
SCO Online Documentation Utiliti 5.0.4a installed
RS504C Documentation Utiliti rs.DocUti applied
RS504C Documentation Utilities S rs.DocUti loaded
X Server 5.2.1b installed
OSS467A: XServer Supplement oss467a.X applied
OSS467A: XServer Supplement for oss467a.X loaded
Video Configuration Manager 5.2.1b installed
RS504C Video Configuration M rs.Vidcon applied
OSS467A: Video Configuration oss467a.V applied
RS504C Video Configuration Manag rs.Vidcon loaded
OSS467A: Video Configuration Man oss467a.V loaded
The agx graphics driver 5.3.0a installed
The ct graphics driver 5.3.0a installed
The ct65548 graphics driver 5.3.0a installed
RS504C ct65548 Graphics Driv rs.ct6554 applied
RS504C ct65548 Graphics Driver S rs.ct6554 loaded
The ct65550 graphics driver 5.3.0a installed
RS504C ct65550 Graphics Driv rs.ct6555 applied
RS504C ct65550 Graphics Driver S rs.ct6555 loaded
The cxm graphics driver 5.3.0a installed
The eff graphics driver 5.3.0a installed
The gd5426 graphics driver 5.3.0a installed
RS504C gd5426 Graphics Drive rs.gd5426 applied
RS504C gd5426 Graphics Driver Su rs.gd5426 loaded
The gd5436 graphics driver 5.3.0a installed
The gd5446 graphics driver 5.3.0a installed
The i128 graphics driver 5.3.0a installed
The m32 graphics driver 5.3.0a installed
The mga graphics driver 5.3.0a installed
The mil graphics driver 5.3.0a installed
The mw graphics driver 5.3.0a installed
The nte graphics driver 5.3.0a installed
RS504C nte Graphics Driver S rs.nte530 applied
RS504C nte Graphics Driver Suppl rs.nte530 loaded
The p9000 graphics driver 5.3.0a installed
The p9100 graphics driver 5.3.0a installed
The qvis graphics driver 5.3.0a installed
The s3 graphics driver 5.3.0a installed
The tms graphics driver 5.3.0a installed
The tta graphics driver 5.3.0a installed
The w32 graphics driver 5.3.0a installed
The wd graphics driver 5.3.0a installed
The wd33 graphics driver 5.3.0a installed
The xga graphics driver 5.3.0a installed
Extended X Clients 5.1.2b installed
RS504C X Clients Supplement rs.XClien applied
RS504C X Clients Supplement rs.XClien loaded
Desktop 3.6.2b installed
RS504C Desktop Supplement rs.Deskto applied
RS504C Desktop Supplement rs.Deskto loaded
Standard X Clients 5.1.2b installed
OSS473A: SCOterm Security Su oss473a.B applied
RS504C Base X11 Runtime Supp rs.BaseX5 applied
OSS473A: SCOterm Security Supple oss473a.B loaded
RS504C Base X11 Runtime Suppleme rs.BaseX5 loaded
DEC FDDIcontroller PCI/EISA Fami 5.0.4d installed
Digital Equipment Corporation IS 5.0.4d installed
Digital Equipment Corporation EI 5.0.4d installed
Digital Equipment Corporation Et 5.0.4d installed
3Com EtherLink XL PCI (3C900) 3C 5.0.4d installed
RS504C e3H Network Driver Su rs.e3H504 applied
RS504C e3H Network Driver Supple rs.e3H504 loaded
IBM Token-Ring Network 16/4 Serv 5.0.4d installed
3Com 3C501 EtherLink 5.0.4d installed
3Com 3C503 EtherLink II 5.0.4d installed
3Com 3C523 EtherLink/MC 5.0.4d installed
3Com 3C507 EtherLink 16 Series 5.0.4d installed
3Com 3C5x9 EtherLink III Series 5.0.4d installed
3Com 3C59x EtherLink III Series 5.0.4d installed
Intel EtherExpress 16 Series 5.0.4d installed
Intel EtherExpress Flash32 LAN A 5.0.4d installed
Intel EtherExpress PRO/10 LAN Ad 5.0.4d installed
Intel EtherExpress PRO/100 LAN A 5.0.4d installed
Intel EtherExpress PRO/100B LAN 5.0.4d installed
RS504C eeE Network Driver Su rs.eeE504 applied
RS504C eeE Network Driver Supple rs.eeE504 loaded
Excelan EXOS 205/205T Series 5.0.4d installed
HFM - HP 10/100VG Bus Master Dri 5.0.4d installed
HFS - HP 10/100VG I/O Slave Driv 5.0.4d installed
IBM 16/4 BusMaster EISA 32 5.0.4d installed
HP 27248 EISA LAN Adapter/32 5.0.4d installed
HP 272XX PC LAN Adapter Series 5.0.4d installed
Racal InterLan ES3210 EISA 5.0.4d installed
Racal InterLan NI6510 EtherBlast 5.0.4d installed
Novell NE2000 and Compatible 5.0.4d installed
Novell NE3200 Bus Master and Com 5.0.4d installed
AMD PCNet Series & NE2100 Compat 5.0.4d installed
RS504C pnt Network Driver Su rs.pnt504 applied
RS504C pnt Network Driver Supple rs.pnt504 loaded
SMC 82M32 EtherCard Elite32 Ultr 5.0.4d installed
SMC 8216 Ethercard Ultra and 841 5.0.4d installed
SMC EtherPower 8432,8434,9332 Se 5.0.4d installed
SMC EtherPower 9432 10/100Mbps 5.0.4d installed
IBM PCI Ethernet Adapter 5.0.4d installed
IBM Token-Ring Network ISA Serie 5.0.4d installed
IBM PCI Token-Ring Adapter 5.0.4d installed
RS504C trps Network Driver S rs.trps50 applied
RS504C trps Network Driver Suppl rs.trps50 loaded
SMC/Western Digital 8003/8013 Se 5.0.4d installed
IBM LANStreamer & EtherStreamer 5.0.4d installed
SCO TCP/IP 2.1.0Eb installed
RS504C TCP Supplement rs.tcp210 applied
RS504C TCP Supplement rs.tcp210 loaded
SCO NFS 2.1.0Eb installed
RS504C NFS Supplement rs.nfs210 applied
RS504C NFS Supplement rs.nfs210 loaded
IPX/SPX Runtime System 2.1.0Ab installed
SCO Gateway for NetWare 1.1.0Ab installed
Network Installation Boot Module 5.1.0b installed
SCO Netscape Navigator Gold 3.0.1c installed
The m64 graphics Driver 5.3.0c installed
The gd5465 graphics Driver 5.3.0c installed
SCO MMDF 2.43.3a installed
SCO ARCserve/Open Lite for SCO O 2.2.0f partially installed
UNIX Development System componen 5.1.0Ha partially installed
RS504C Unix Development Syst rs.Unixds applied
RS504C Unix Development System S rs.Unixds loaded
SCO ARCserve/Open Lite Drivers 2.2.0f partially installed
SCO Doctor Lite 2.0.0e installed
SCO Doctor Documentation 2.0.0e installed
SCO C++ Development System 3.1.3Fb partially installed
Administration Framework Develop 1.0.1Aa installed
Extended Tcl Development System 7.3.2b installed
X11/Motif Development System com 5.2.5i partially installed
SCO TCP/IP Development System 2.1.0Eb installed
RS504C TCP Development Syste rs.tcpdev applied
RS504C TCP Development System Su rs.tcpdev loaded
SCO NFS Development System 2.1.0Eb installed
Development System for NetWare c 2.0.0c installed
SCO Merge 3.2.2t installed
RS504C Merge Supplement rs.Merge3 applied
RS504C Merge Supplement rs.Merge3 loaded
The gd5480 graphics Driver 5.3.0c installed
SCO ARCserve/Open Changer Option 2.1.0e partially loaded
SCO ARCserve/Open Client Agent f 3.1.0e partially loaded
SCO ARCserve/Open Client Agent f 3.1.0e partially loaded
SCO ARCserve/Open Client Agent f 3.1.0e partially loaded
SCO ARCserve Database Agent for 1.0.0e partially loaded
SCO ARCserve Database Agent for 1.0.0e partially loaded
SCO ARCserve/Open for SCO OpenSe 2.1.0e installed
SCO ARCserve/Open Drivers 2.1.0e installed
SCO ARCserve/Open Disaster Recov 2.1.0e installed
SCO ARCserve/Open Documentation 2.1.0e installed
Character mode web browser 2.7.1 installed
GNU Bourne-Again Shell 2.01 installed
GNU Compression Tools 1.2.4 installed
GNU Patch Utility 2.4 installed
GNU Make 3.75 installed
Fast lexical analyzer generator 2.5.4 installed
GNU Auto Configuration 2.12 installed
GNU Find Utilities 4.1 installed
GNU Diff Utilities 2.7 installed
GNU Tar 1.12 installed
Apache web server 1.2.1 installed
GNU Development System 2.7.2.1 installed
Perl - Practical Extraction and 5.003 installed
SCO OpenServer Enterprise System 5.0.4p partially installed
SCO ARCserve/Open Lite from Chey 2.2.0f partially installed
SCO Doctor Lite 2.0.0b installed
SCO OpenServer Linker and Applic 5.1.0Ac installed
OSS473A: SCOterm Security Supple oss473a loaded
Software Manager Supplement rs504c loaded
Supplemental Graphics Hardware S rs504c installed
Release Supplement for SCO OpenS rs504c partially loaded
OSS470A: Intel Pentium 'invalid oss470a partially loaded
OSS465B: ScoMail Supplement oss465b partially loaded
OSS467A: Supplement for MaxSpeed oss467a.2 loaded
SCO ARCserve/Open Database Agent 1.0.0e partially loaded
SCO ARCserve/Open from Cheyenne 2.1.0e installed
Lynx Character Based Browser 2.7.1 installed
GZIP GNU Compress 1.2.4 installed
Patch 2.4 installed
Make 3.75 installed
Flex 2.5.4 installed
GNU Automatic Configuration 212. installed
Findutils 4.1 installed
Diffutils 2.7 installed
Tar 1.12 installed
Gcc 2.7.2.1 installed


Jeff Liebermann

unread,
Mar 31, 1998, 3:00:00 AM3/31/98
to

On Tue, 31 Mar 1998 20:39:29 +0200, TT <too...@mbp.ee> wrote:

>We are using SCO OSR5.0.4 enterprise system as our webserver on HP
>Netserver 5/100 LS w. 128M memory and 3com 3c905-tx. Patches,
>implemented to the system: rs504c, oss470a, oss465b, oss467a.2, oss473a,
>oss459a.
>System crashes at night or morning, not at some particular time but
>periodically every night, usually we notice this from dead ip. Logging
>in from console is quite painful, because something has drained almost
>all system resources and it takes five to ten minutes to get the shell
>prompt... Once I found around 40-50 cron and dlvr_audit processes, when
>I managed to log in, but it's not the case every time - at some hangs I
>have not noticed any particular changes from "usual" process list.

Thanks for the detailed description. Whenever the fox is raiding
the chicken coop at night, the usual proceedure is to set a trap.
In this case, methinks some flavour of monitoring program is in
order. Since there's no footprints, the trap will need to be
large enough for fox or bear.

1. Setup sar to log data 24 hours. Try to get a feel for what
is considered normal and when things go insane. There should be
a correlation between cron and the failure.

2. If this is a publicly exposed web server, make some effort to
install the various secuirty enhancements (fixes). See the SCO
support web page for details.

3. Try to determine if there is a sequence of events. For
example, the backlog of jobs may be caused by some kind of
network failure which prevents something from being delivered.

4. Set the file:
/etc/default/cron
to turn on logging. Be careful here as the logfile grows VERY
fast. Look for suprises.

5. Inspect /usr/adm/syslog for clues. The trick will be to find
some correlation between cron, syslog, sar, and failure.

6. Run some kind of SNMP monitor program on another machine to
determine if you web server is alive. I use MRTG (multi-router
traffic grapher) which graphs historical information (and looks
inpressive to the customers). See my page at:
http://www.cruzio.com/~jeffl/sco/
for some references on SNMP and MRTG. The key is to run this
from another machine as the one that's failing is unlikely to
give useable results.

7. Try to get a snapshot of the process table at various times.
Some kind of cron job that saves the process table to a series of
log files will do. A simple benchmark to determine the system
speed would also help determine when things go awry.

8. Keep an eye on the PID (process ID) numbers. Rapidly
increasing numbers indicates a process that's doing nothing more
than exec'ing other processes. If the PID numbers increase
rapidly, some program has gone insane.

9. Keep an eye on network traffic. Given a sufficiently large
enough pipe, one can swamp a server from the network. Look for
traffic anomalies, bursts of traffic, unusual requrests, and the
usual garbage. I use Netmon on NT4 (part of SMS 1.1) for
monitoring.

10. Beware of duplicate IP addresses. I never cease to be
amazed at all the weird things that happen with duplicate IP
addresses. One of my customers setup a network printer using the
IP address of the Unix server hard coded into NVRAM. It actually
worked for a day, and the symptoms were truely bizarre. I would
never have found it had there also not been problems with the
printer. The clue is to dump the address resolution table:
arp -a
and look for errors, garbage, and MAC-IP address pairs that
change.

Customer bearing checkbook. I'm gone...

Jeff Liebermann 150 Felker St. #D Santa Cruz CA 95060
(408)699-0483 pager (408)426-1240 fax (408)336-2558 home
http://www.cruzio.com/~jeffl WB6SSY
je...@comix.santa-cruz.ca.us je...@cruzio.com

Bela Lubkin

unread,
Apr 1, 1998, 3:00:00 AM4/1/98
to

<too...@mbp.ee> wrote:

> We are using SCO OSR5.0.4 enterprise system as our webserver on HP
> Netserver 5/100 LS w. 128M memory and 3com 3c905-tx. Patches,
> implemented to the system: rs504c, oss470a, oss465b, oss467a.2, oss473a,
> oss459a.
> System crashes at night or morning, not at some particular time but
> periodically every night, usually we notice this from dead ip. Logging
> in from console is quite painful, because something has drained almost
> all system resources and it takes five to ten minutes to get the shell
> prompt... Once I found around 40-50 cron and dlvr_audit processes, when
> I managed to log in, but it's not the case every time - at some hangs I
> have not noticed any particular changes from "usual" process list.
>

> By now, I have consumed all my supply of ideas... :( so, any help would
> be GREATLY appreciated.

"drained almost all system resources" probably means that a process has
grown to infinite size, then dumped core. This is caused by a program
bug; usually, some sort of infinite recursion.

The system has per-process limits which can be used to prevent such
"memory events". Attached below is my script, /etc/dolimits, which
establishes such limits on a system-wide basis.

>Bela<

--
Tales of our recent world trip, http://www.armory.com/~alexia/trip/trip.html

=============================================================================

#
# /etc/dolimits 2.1.0, 1998/04/01 be...@sco.com
#
# Originally written by John DuBois, <jo...@armory.com>
# 2.0.0, 1997/07/27, <be...@sco.com>
# -- Modified greatly by Bela Lubkin, <be...@sco.com>
# 2.1.0, 1998/04/01, <be...@sco.com>
# -- More docs; default files included in main script; support tcsh
# abbreviations for limit names
#
# Reads /etc/default/limits (or an alternate file supplied in a shell
# variable, $ALTERNATE_LIMIT_FILE) in order to establish per-process
# resource limits. This is a ksh/bash/zsh script segment which
# processes tcsh-format limit statements. Thus, one file can supply
# identical limits to tcsh, ksh, bash and zsh.
#
# SCO's sh and csh do not implement extended ulimits. Workarounds are
# possible by invoking ksh along the way. This file doesn't attempt to
# provide such workarounds -- instead, upgrade your sh users to ksh, csh
# users to tcsh. You can also use /etc/default/limits.init to establish
# system-wide limits, which will then apply to sh and csh logins (but
# also to system daemons, so don't make those limits too tight).
#
# None of this works on any SCO Unix release before OpenServer Release
# 5.0.0. Earlier releases only support the file-size limit.
#
# INSTALLATION/USE
# ================
# 1. Create a file /etc/default/limits, containing modern C-shell
# statements to establish the desired per-login-process limits.
# A sample file is included below.
#
# 2. Add a line to /etc/profile that reads:
#
# . /etc/dolimits
#
# 3. Add a line to /etc/cshrc that reads:
#
# if ( -r /etc/default/limits && { limit } ) source /etc/default/limits >& /dev/null
#
# This will work correctly with tcsh, and fail silently with csh
# (since it doesn't support the "limit" command). One workaround for
# this is to replace /bin/csh with tcsh (and your users will probably
# thank you).
#
# 4. If you want to establish system-wide resource limits (that apply to
# all processes, not just processes under a user login), perform
# steps 4a and 4b:
#
# 4a. Create a file /etc/default/limits.init, in the same format as
# /etc/default/limits. These limits will apply to all processes in
# the system, so do not be too stingy.
#
# 4b. Replace the last line of /etc/initscript (``eval exec "$4"'') with
# the following lines:
#
# exec /bin/ksh -c 'ALTERNATE_LIMIT_FILE=/etc/default/limits.init;
# . /etc/dolimits
# unset ALTERNATE_LIMIT_FILE
# eval exec "'"$4"'"'
#
# 5. TEST!!!! If you got it wrong, you might not be able to log back in
# to fix it. ***BEFORE*** logging out, make sure you can:
#
# 5a. ... still login as root.
#
# 5b. ... still login as a normal user.
#
# 5c. ... still start a process which is executed out of inittab. A
# simple test is to login on a text screen on the console
# (Ctrl-Alt-F1), logout, and login a second time. The second
# login is provided by a getty process which was started by
# inittab, and will be subject to any changes you made to
# /etc/initscript.
#
# 5d. ... still login over a network (rlogin, telnet, anything else
# you use).
#
# 5e. If you've established system-wide limits, you need to reboot to
# fully test those. Make sure you have a good WORKING set of boot
# floppies (`mkdev fd`, or the crash-recovery floppies generated
# by one of the third party backup utilities), before you reboot!

LIMITS=${ALTERNATE_LIMIT_FILE:-/etc/default/limits}

# If we have a $LIMITS file and support an extended ulimit...
if [ -f $LIMITS -a -r $LIMITS ] && ulimit -a >/dev/null 2>&1; then
# Entries in /etc/default/limits have the form of csh limit commands
while read cmd limit amount amount2 junk; do
strength=S
case $cmd in
limit) ;;
*) continue ;;
esac
case $limit in
-h) strength=H; limit="$amount"; amount="$amount2";;
esac
case $limit in
filesize|f* ) limit=f;;
descriptors|de*) limit=n;;
cputime|cp*) limit=t;;
datasize|da*) limit=d;;
stacksize|s* ) limit=s;;
vmemoryuse|v* ) limit=v;;
coredumpsize|co*) limit=c;;
*) echo dolimits: unknown limit '`'$limit"'" 1>&2; continue;;
esac
case $limit in
[cf]) let amount="$amount*2";;
# "let" works in ksh, bash & zsh. tcsh "limit coredumpsize" and
# "limit filesize" are in 1/2K blocks, ksh/bash/zsh expect 1K blocks.
esac
ulimit -$strength$limit "$amount" >/dev/null 2>&1 || {
echo "ulimit -$strength$limit $amount: \c"
ulimit -$strength$limit "$amount"
}
done < $LIMITS
fi
unset LIMITS cmd limit amount amount2 junk strength

#############################################################################
############### sample /etc/default/limits file ################
############### remove one layer of comments (#) to activate ################
#############################################################################

##
## /etc/default/limits 2.1.0, 1998/04/01 be...@sco.com
##
## Originally written by John DuBois, <jo...@armory.com>
## Modified greatly by Bela Lubkin, <be...@sco.com>
##
## Pre-process resource limits, read by /etc/dolimits. These are given
## as tcsh commands to make things easy on tcsh; ksh and related shells
## translate them using a case statement.
##
## Seven limits are supported: descriptors (RLIMIT_NOFILE), filesize
## (RLIMIT_FSIZE), cputime (RLIMIT_CPU), datasize (RLIMIT_DATA),
## stacksize (RLIMIT_STACK), vmemoryuse (RLIMIT_AS), and coredumpsize
## (RLIMIT_CORE). Use "-h" to set a hard limit, no flag for soft limits.
##
## NOTE: when lowering a hard limit, you must first set the soft limit at
## or below the new hard limit. Individual shells may vary on their
## behavior otherwise, but at least one will fail.
##
## See setrlimit(S) for details on process resource limits.
##
## If you set the core dump limit to 0, starting with OpenServer Release
## 5.0.4, no core dumps will be generated at all. Be sure to leave the
## hard limit non-zero, so that your users can raise it if they are in
## the process of debugging a program.
##
## The un-commented set of limits are intended to prevent "memory events"
## where a runaway process eats all the memory in the system, then dumps
## core for an excessively long time. The other (commented) limits are
## my idea of reasonable values, if you feel the need to limit
## everything. They also serve to enumerate all possible limits.
#
## limit descriptors 60 # (soft) Max files open at once: 60
## limit -h descriptors 200 # (hard) Max files open at once: 200
## limit filesize 65536 # (soft) File size: 64MB
## limit -h filesize unlimited # (hard) File size: unlimited
## limit cputime 3600 # (soft) CPU limit: 1 hour
## limit -h cputime unlimited # (hard) CPU limit: unlimited
## limit datasize 65536 # (soft) Process data size: 64MB
## limit -h datasize unlimited # (hard) Process data size: unlimited
# limit stacksize 8192 # (soft) Process stack size: 8MB
# limit -h stacksize unlimited # (hard) Process stack size: unlimited
# limit vmemoryuse 65536 # (soft) Process virtual size: 64MB
# limit -h vmemoryuse unlimited # (hard) Process virtual size: unlimited
# limit coredumpsize 16384 # (soft) Core dump size: 16MB
# limit -h coredumpsize 32768 # (hard) Core dump size: 32MB

#############################################################################
############### sample /etc/default/limits.init file ################
############### remove one layer of comments (#) to activate ################
#############################################################################

##
## /etc/default/limits.init 2.0.0, 1997/07/27 be...@sco.com
##
## Originally written by John DuBois, <jo...@armory.com>
## Modified greatly by Bela Lubkin, <be...@sco.com>
##
## See /etc/default/limits for comments. These limits are read by
## /etc/dolimits during the execution of /etc/initscript. They apply to
## all user-level processes on the system.
##
## The default set of limits, below, are intended to prevent "memory
## events" where a runaway process eats all the memory in the system,
## then dumps core for an excessively long time.
##
#
# limit stacksize 16384 # (soft) Process stack size: 16MB
# limit vmemoryuse 65536 # (soft) Process virtual size: 64MB
# limit coredumpsize 16384 # (soft) Core dump size: 16MB

0 new messages