Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!mailrus!umix!b-tech!zeeff From: zeeff@b-tech.UUCP (Jon Zeeff) Newsgroups: comp.mail.uucp Subject: Re: When the disk runneth over, UUCP keeps on sending. Message-ID: <4285@b-tech.UUCP> Date: 1 Mar 88 01:22:43 GMT References: <1224@beowulf.UUCP> <1988Feb25.231353.10821@lsuc.uucp> Reply-To: zeeff@b-tech.UUCP (Jon Zeeff) Organization: Branch Technology Ann Arbor, MI Lines: 42 This seems to work well here. # # This demon script watches for a lack of space and kills incoming 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. # # - Jon Zeeff umix!b-tech!zeeff PATH=/bin:/usr/bin:/usr/lbin sleep 200 cd /usr/spool/uucp while true do FREE=`df /usr/spool/news | sed -e "s/[^:]*: *\([0-9]*\) blocks.*/\1/"` SPOOLFREE=`df / | sed -e "s/[^:]*: *\([0-9]*\) blocks.*/\1/"` if [ $FREE -lt 2000 -o $SPOOLFREE -lt 1000 ] 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 fi sleep 500 done -- Jon Zeeff Branch Technology, uunet!umix!b-tech!zeeff zeeff%b-tech.uucp@umix.cc.umich.edu