gosciak@wybbs.mi.org (Doug Gosciak) (11/16/90)
Help!!! I'm having trouble getting C News running on my new A/UX 2.0 system. Has anyne succesfully gotten C News to run under A/UX 2.0? The problem I seem to be having is that for some reason a few blocks of UUCP inout gets processed OK, but then spacefor keeps failing resulting in C News thinking that there is not sufficient space to process the mail. In fact there is plenty of room to do its job and spacefor run manually by root works just fine.
alexis@panix.uucp (Alexis Rosen) (11/16/90)
In article <541@wybbs.mi.org> gosciak@wybbs.mi.org (Doug Gosciak) writes: >Help!!! I'm having trouble getting C News running on my new A/UX 2.0 system. >Has anyne succesfully gotten C News to run under A/UX 2.0? > >The problem I seem to be having is that for some reason a few blocks of UUCP >inout gets processed OK, but then spacefor keeps failing resulting in C News >thinking that there is not sufficient space to process the mail. In fact there >is plenty of room to do its job and spacefor run manually by root works just fine. I *LOVE* Cnews!!! Bringing it up was a breeze, and it's at _least_ 30 times faster than bnews. Even if I do need to use "setnewsids". (But I'll see about patching that out in a week or so.) To the point- I'll bet that you're running the FFS on your disk, and that as root you have some number, not much over 10%, of disk blocks free. So as root, you've got plenty of space, but as non-root news, you're very low on blocks. Read the man page on "tunefs" for a discussion of FFS disks that's relevant to your problem. This is true, as far as I know, of all Berkeley filesystems, not just on A/UX. Other than that, Cnews was _very_ easy. Just answer the questions, no hacks necessary. Of course, it helps a little if you tune a few of the most-called shell scripts. You can do some good by eliminating the if in the awk script in sizeof (you want the second branch). And you can optimize spacefor. Here's my version, with a small section up front for NNTP removed (so put it back in if you want it). 1) Don't forget to change the space parameters. 2) I'm running Vicki Brown's nice df-bsd script in place of standard df. Using this script from within spacefor is a terrible idea, though, so my spacefor calls the original- df.aux. If you aren't using her script, change the reference back to plain "df". 3) If you are really feeling ambitios, you could do two more things here. First, since A/UX is 32-bit, I *think* (check it!) that awk can handle 32-bit ints. That means that you can get rid of the size check in the awk script. Or, even more daring, you could try replacing the awk with expr, as is suggested by the comments in the script. Of course, you could just leave well enough alone... BTW, recent versions have supported a UUCP type of "old". This is in fact the correct type for A/UX, so you no longer need to hack on cnews for that. ("Prehistoric" is _wrong_.) Good luck, --- Alexis Rosen Owner/Sysadmin, PANIX Public Access Unix, NY {cmcl2,apple}!panix!alexis ------------------------------>% Cut here %<----------------------------- #! /bin/sh # spacefor - determine available disk space # About how many things of $1 bytes will fit in the available space for # stuff of type $2 ("incoming", "articles", "control", "outbound $3", # or "archive") without cramping things too badly? # # Modified 9/30/90 by AMR for speed- removed server case, changed awk script # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()= . ${NEWSCONFIG-/usr/lib/news/bin/config} PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH umask $NEWSUMASK # head off special case case "$1" in 0) echo 10000 ; exit 0 ;; esac # argument to df, and free space desired (in df units) # set desire very low, since the whole disk's for news case "$2" in incoming) arg="$NEWSARTS/in.coming" ; desire=700 ;; articles) arg="$NEWSARTS" ; desire=300 ;; control) arg="$NEWSCTL" ; desire=200 ;; # for expire, mostly outbound) arg="/usr/spool/uucp" ; desire=800 ;; # ignore $3 archive) arg="$NEWSARTS" ; desire=1 ;; # system-specific *) echo "$0: bad type argument \`$2'!!" >&2 exit 2 ;; esac # Not standard Cnews! df.aux $arg | awk "{ nb = (\$3 - $desire) * 512 / $1 if (nb > 10000) nb = 10000 # ensure representable as integer nb = int(nb) if (nb <= 0) print 0 else print nb exit }"