Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!caip!ucla-cs!sdcrdcf!trwrb!desint!geoff From: geoff@desint.UUCP (Geoff Kuenning) Newsgroups: net.news.b Subject: Re: Inews vs. df Message-ID: <239@desint.UUCP> Date: Tue, 29-Jul-86 02:25:08 EDT Article-I.D.: desint.239 Posted: Tue Jul 29 02:25:08 1986 Date-Received: Thu, 31-Jul-86 02:06:13 EDT References: <2400@phri.UUCP> Reply-To: geoff@desint.UUCP (Geoff Kuenning) Organization: SAH Consulting, Manhattan Beach, CA Lines: 133 In article <2400@phri.UUCP> roy@phri.UUCP (Roy Smith) writes: > About the title of this article: around here we have two programs > we use a lot. Inews runs every night and every morning I run df to see > what the damage was. Df usually loses. :-) I used to have that problem, too, so I wrote the enclosed shell script, inspired by /usr/lib/acct/ckpacct. I run it with the following crontab line: 0,15,30,45 * * * * * exec /usr/lib/uucp/ckuucp 1000 500 1600 800 '11 / 10' 2>/dev/null (I don't get compressed news; for compressed news you will want '11 / 4' in place of '11/10'). Don't forget to remove my .signature from the bottom. #!/bin/sh # # %W% %G% %U% # # Periodically check the amount of disk space left on /usr # If it falls below $1 blocks (500 default), kill any running uucico # as soon as its current temp file disappears. If it falls below # $2 blocks (100 default), kill all running uucico's regardless of # whether the current temp file is complete. # # The size of the news spool directory is also watched. If the sum of # the sizes of the D.* and TM.* files in /usr/spool/uucp, subtracted # from the free space on NEWSSYS, is less than $3 (default is the # value of $1), a soft limit on uucico's is invoked. Similarly, if # $4 (default $2) is exceeded, uucico's will be killed immediately. # # $5 is a multiplicative factor that will be applied to the number of # blocks in D.* files. This is intended to allow space for fragmentation # and archiving. The factor must be expressed as a rational number. It # must be quoted, and if it contains shell metacharacters they must be # escaped *inside* the quotes. For example, # # "5 \* 3"