[comp.mail.uucp] When the disk runneth over, UUCP keeps on sending.

root@beowulf.UUCP (pilot and all 'round good guy) (02/20/88)

	Help, when my /usr/spool drive fills up, uucp doesn't shut off.
This is causing me to loose news (no big deal) and to loose mail (not
good). 
	The question is, is there a way to get uucp to stop recieving
when the disk fills up? 
	Configuration: Tandy/MS Xenix 68000 V3.2

	Thanks,
		bob

dave@lsuc.uucp (David Sherman) (02/26/88)

root@beowulf.UUCP writes:
>	The question is, is there a way to get uucp to stop receiving
>when the disk fills up? 

We use a homegrown shell script called "spoolfull". It looks at
the output of df for the file system in which /usr/spool resides,
and if it goes below a threshold (say 1Mb), runs "mv /usr/lib/uucp/uucico
/usr/lib/uucp/uucico-stopped", then sends mail to the sysadmins.
Trivial enough to write.  If you're worried about the uucico currently
running when uucico is stopped, get the PID out of ps(1) or the LCK..infeed
file and kill it off. Run spoolfull from crontab every hour or whatever.

David Sherman
The Law Society of Upper Canada
Toronto
-- 
{ uunet!mnetor  pyramid!utai  decvax!utcsri  ihnp4!utzoo } !lsuc!dave

zeeff@b-tech.UUCP (Jon Zeeff) (03/01/88)

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

clewis@spectrix.UUCP (Chris R. Lewis) (03/03/88)

In article <4285@b-tech.UUCP> zeeff@b-tech.UUCP (Jon Zeeff) writes:
|
|This seems to work well here.
|
|#
|# This demon script watches for a lack of space and kills incoming uucico
|# jobs when space is low.
|# 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

[ most code omitted ]

|               kill `cat /usr/spool/locks/LCK..$i`

Something like this will work on most non-HDB systems:

		set `od -d /usr/spool/uucp/LCK..$i`
		kill $2

On BSD4.3 UUCP you will probably need this instead:

		set `od -d /usr/spool/uucp/LCK/LCK..$i`
		kill $2
-- 
Chris Lewis, Spectrix Microsystems Inc,
UUCP: {uunet!mnetor, utcsri!utzoo, lsuc, yunexus}!spectrix!clewis
Phone: (416)-474-1955

mangler@cit-vax.Caltech.Edu (Don Speck) (03/06/88)

In article <1224@beowulf.UUCP>, root@beowulf.UUCP (pilot and all 'round good guy) writes:
>	Help, when my /usr/spool drive fills up, uucp doesn't shut off.

There exists at least one uucico that doesn't have this problem.
Observe this excerpt from my LOGFILE when we were pushing out a
week's Usenet backlog:

news oxy (2/23-07:59-25505) REQUEST FAILED (remote system can't create temp file)
news oxy (2/23-07:59-25505) OK (conversation complete)

Checking further in the logfile, the failed request was indeed attempted
again later.  So even though we ran them out of disk repeatedly, they
never lost any mail.  Their machine is a Prime, running Primix + Primos.

Don Speck   speck@vlsi.caltech.edu  {amdahl,ames!elroy}!cit-vax!speck

paul@devon.UUCP (Paul Sutcliffe Jr.) (03/09/88)

In article <5662@cit-vax.Caltech.Edu> mangler@cit-vax.Caltech.Edu (Don Speck)
writes:
> In article <1224@beowulf.UUCP>, root@beowulf.UUCP writes:
> >	Help, when my /usr/spool drive fills up, uucp doesn't shut off.
> 
> There exists at least one uucico that doesn't have this problem.
> Observe this excerpt from my LOGFILE when we were pushing out a
> week's Usenet backlog:
> 
> news oxy (2/23-07:59-25505) REQUEST FAILED (remote system can't create temp file)
> news oxy (2/23-07:59-25505) OK (conversation complete)

HoneyDanBer UUCP apparantly checks free space before allowing a file to be
received, as can be seen in the following excerpt:

uucp vu-vlsi  (2/27-7:14:12,13434,119) REMOTE REQUESTED (vu-vlsi!D.vu-vlsiXQ1P0 --> devon!X.vu-vlsidQ1P3 (news))
news vu-vlsi  (2/27-7:14:13,13434,119) REMOTE TRANSFER DENIED -  (FREESPACE IS LOW)
uucp vu-vlsi  (2/27-7:14:23,13434,119) OK (conversation complete tty01 13737)

- paul

-- 
Paul Sutcliffe, Jr.				       +----------------------+
						       |  THINK ...           |
UUCP (smart):  paul@devon.UUCP			       |            or THWIM  |
UUCP (dumb):   ...rutgers!bpa!vu-vlsi!devon!paul       +----------------------+

romkey@kaos.UUCP (John Romkey) (03/10/88)

The other day I was looking at the UUCP logs as kaos was sending news
to its neighbor blblbl, and I was quite impressed to notice that blblbl
started telling kaos that it had run out of disk space, and kaos didn't
insist on sending the whole message.

But then the damned thing deleted all the files that blblbl rejected because
there wasn't space.

I'm running SCO Xenix 2.1.3 here on kaos. Hope to be running something better
soon.
-- 
			- john romkey
		...harvard!spdcc!kaos!romkey
		       romkey@kaos.uucp
		    romkey@xx.lcs.mit.edu