Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!sceard!mrm From: mrm@sceard.Sceard.COM (M.R.Murphy) Newsgroups: news.software.b Subject: ihave/sendme problems and fixes Message-ID: <1990Jun28.222640.12674@sceard.Sceard.COM> Date: 28 Jun 90 22:26:40 GMT Reply-To: mrm@Sceard.COM (M.R.Murphy) Organization: Sceard Systems, Inc., San Marcos, CA 92069 Lines: 88 It would appear that ${NEWSBIN}/batch/batchsplit has a problem with ihave/sendme. The ${NEWSARTS}/out.going/*.ihave/togo* and ${NEWSARTS}/out.going/*.sendme/togo* files have lines that contain only an article id and not a size. Therefore ${NEWSBIN}/batch/batchsplit assumes a default article size of 3000 when splitting togo to make togo.0, togo.1, ... This is wrong for ihave and sendme messages; for ihave/sendme the size of the article id and not the size of the article is appropriate for comparing with the size of batch parameter in ${NEWSCTL}/batchparms. The value 60 (doesn't C news generate nice long article id's :-) would seem more appropriate for ihave/sendme than 3000. The result is lots and lots of little control messages, and a togo backlog in somesystem.ihave and somesystem.sendme that reached 30000 articles :-) I fixed the problem by changing the line in sendbatches that used to read batchsplit $batchsize to batchsplit $batchsize $batcher and adding # set the default size for the result of a togo line based on the batcher if [ x$2 = xbatcher ] then defsize=3000 else defsize=60 fi before # pick an input file, shuffling togo aside if needed, and unlock ... in batchsplit. I also changed the usage message in batchsplit to be 0) echo 'Usage: batchsplit size [batcher]' >&2 but that's pretty much cosmetic. I tried to fix this behavio(u)r by making the minimum number of changes to what came in the C news box. Also, ${NEWSBIN}/queuelen doesn't do what I expected for ihave/sendme. queuelen always returns zero for ihave/sendme , since neither the directory for somesystem.ihave nor somesystem.sendme is in the /usr/spool/uucp tree. The directory for somesystem would be. I modified queuelen to be the following (System V(tm) HDB flavo(u)red, sorry, other environments left as an exercise for the interested reader :-) ----- #! /bin/sh # Find size of current queue of news outbound to $1. HDB/BNU version. # =()<. ${NEWSCONFIG-@@}>()= . ${NEWSCONFIG-/usr/lib/news/bin/config} PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH umask $NEWSUMASK cd /usr/spool/uucp sys=`echo $1|cut -d "." -f1` if test -d $sys then cd $sys grep "news" C.* 2>/dev/null|grep -v X|wc -l else echo 0 fi ----- I'm sure someone will come up with a more elegant way of doing the same thing, but this works the way I think that it should given the descriptions of the parameters on a line in ${NEWSCTL}/batchparms. Maybe I did this right, maybe not, and it may work by accident, much as it sort of didn't work before, at least not in the expected manner. Maybe all of this has already been discussed and I didn't see it. Maybe nobody cares, and this is just a waste of bandwith, but I think probably not. C news has changed the idle cpu cycles on our news/mail machine from 0% (over a four day period, with mounting news backlog, which was the reason that finally forced me to changing to C news :-) to 40%. Thanks to Henry and Geoff for 4/10's of a machine, and for software that is easy to maintain and to modify for one's particular needs. -- Mike Murphy Sceard Systems, Inc. 544 South Pacific St. San Marcos, CA 92069 mrm@Sceard.COM {hp-sdd,nosc,ucsd,uunet}!sceard!mrm +1 619 471 0655