Xref: utzoo news.software.b:1943 comp.unix.wizards:14771 comp.unix.microport:2864 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!b-tech!zeeff From: zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) Newsgroups: news.software.b,comp.unix.wizards,comp.unix.microport Subject: Re: Need to patch inews/rnews so it will watch for inode underflow Keywords: inews/rnews, inode_count Message-ID: <5124@b-tech.ann-arbor.mi.us> Date: 19 Feb 89 16:08:06 GMT References: <222@tree.UUCP> Reply-To: zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) Organization: Branch Technology Ann Arbor, MI Lines: 60 If you are running out of inodes, you should mkfs with more or, if it's the inode bug, fix it. But this script will help. # # This demon script (uukill) watches for a lack of space and kills incoming o # uucico jobs when space is low. # This is done to prevent a site from sending # more usenet news than this system can handle. # Written for HDB uucp. Non HDB uucp systems may be able to get the pid # from the TM file name. # # Run from /etc/inittab with: # # uk:23:respawn:/etc/uukill # # - Jon Zeeff umix!b-tech!zeeff PATH=/bin:/usr/bin:/usr/lbin ADMIN=zeeff sleep 200 cd /usr/spool/uucp while true do set `df /` FREE=$4 SPOOLFREE=$6 set `df /usr/spool/news` IFREE=$4 SPOOLIFREE=$6 if [ $FREE -lt 1500 -o $SPOOLFREE -lt 2000 -o $IFREE -lt 200 -o $SPOOLIFREE -lt 200 ] then # kill the jobs with LCK files and TM files for i in `uuname` do if test -f /usr/spool/locks/LCK..$i && /bin/ls $i/TM* then kill `cat /usr/spool/locks/LCK..$i` fi 2> /dev/null > /dev/null done if test ! -f /tmp/full then echo "Killing uucp - disk is full" > /tmp/full df >> /tmp/full mail $ADMIN < /tmp/full fi fi sleep 500 done -- Jon Zeeff zeeff@b-tech.ann-arbor.mi.us Ann Arbor, MI mailrus!b-tech!zeeff