🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #2732

Changes to INN FAQ Part 1/4: General Information

#2732
From: Tom Limoncelli
Date: Wed, 20 Jul 1994 04:00
365 lines
15456 bytes
Posted-By: auto-faq 2.4
Archive-name: inn-faq/diff1

*** FAQ-inn.1-lastposted	Tue Jul  5 00:00:21 1994
--- FAQ-inn.1	Wed Jul 20 00:00:07 1994
***************
*** 1,4 ****
! Last Changed: $Id: FAQ-inn.1,v 1.74 1994/06/10 19:03:11 tal Exp $
  
                    Part 1 of 4
  
--- 1,4 ----
! Last Changed: $Id: FAQ-inn.1,v 1.81 1994/07/18 15:16:07 tal Exp $
  
                    Part 1 of 4
  
***************
*** 36,41 ****
--- 36,42 ----
  	How do I thank the FAQ maintainer?
  
  SPECIFIC NOTES FOR SPECIFIC OPERATING SYSTEMS:
+ 	BASH tips
  	AIX tips
  	SunOS 4.1.2 tips
  	Ultrix tips
***************
*** 46,51 ****
--- 47,53 ----
  	Pyramid and system's where only root can have "cron" jobs.
  	All System V based Unixes (SVR4, Solaris 2.x, SCO ODT 3.0, A/UX, DELL, ...)
  	Solaris 2.x special needs
+ 	3Com Router users
  	NOV problems on a Pyramid
  	Warnings to people that must set HAVE_UNIX_DOMAIN to DONT
  
***************
*** 142,149 ****
  If you have socket() and select() then INN will probably run on your
  machine.  In addition to the common platforms found around the Internet
  (SunOS and Ultrix, for example), INN runs on IBM`s AIX, Apple's A/UX,
! NeXT, Solaris 2.x, most SVR4 platforms, BSDI, most free BSD systems on
! Intel (NetBSD, FreeBSD, ...) and a host of others.  It might require a
  little bit of tweaking of some free BSD platforms that have really bad
  shells.
  
--- 144,151 ----
  If you have socket() and select() then INN will probably run on your
  machine.  In addition to the common platforms found around the Internet
  (SunOS and Ultrix, for example), INN runs on IBM`s AIX, Apple's A/UX,
! NeXT, Solaris 2.x, most SVR4 platforms, BSDI, most free BSD systems 
! (NetBSD, FreeBSD, ...) and a host of others.  It might require a
  little bit of tweaking of some free BSD platforms that have really bad
  shells.
  
***************
*** 355,361 ****
--- 357,503 ----
              SPECIFIC NOTES FOR SPECIFIC OPERATING SYSTEMS
  ======================================================================
  
+ ------------------------------
  
+ Subject: BASH tips
+ 
+ If you are using a Unix who's /bin/sh is a hardlink to
+ bash, you'll find problems using nntpsend.  nntpsend uses
+ a variable named PPID, which is a read-only variable in BASH.
+ 
+ You'll get errors that look like this:
+ sh: PPID: read-only variable
+ 
+ You can fix it using the the following patch:
+ 
+ 
+ *** nntpsend~   Thu Aug 12 03:36:16 1993
+ --- nntpsend    Sat Oct 23 15:54:11 1993
+ ***************
+ *** 1,4 ****
+ ! #! /bin/sh
+   ##  $Revision: 1.81 $
+   ##  Send news via NNTP by running several innxmit processes in the background.
+   ##  Usage:
+ --- 1,4 ----
+ ! #!/usr/local/bin/bash
+   ##  $Revision: 1.81 $
+   ##  Send news via NNTP by running several innxmit processes in the background.
+   ##  Usage:
+ ***************
+ *** 130,140 ****
+       chmod 0660 ${LOG}
+       exec >>${LOG} 2>&1
+   fi
+ ! PPID=$$
+ ! echo "${PROGNAME}: [${PPID}] start"
+   
+   ##  Set up environment.
+ ! export BATCH PROGNAME PPID INNFLAGS
+   
+   ##  Loop over all sites.
+   cat ${INPUT} | while read SITE HOST MAXSIZE FLAGS; do
+ --- 130,140 ----
+       chmod 0660 ${LOG}
+       exec >>${LOG} 2>&1
+   fi
+ ! CPID=$$
+ ! echo "${PROGNAME}: [${CPID}] start"
+   
+   ##  Set up environment.
+ ! export BATCH PROGNAME CPID INNFLAGS
+   
+   ##  Loop over all sites.
+   cat ${INPUT} | while read SITE HOST MAXSIZE FLAGS; do
+ ***************
+ *** 240,246 ****
+       fi
+   
+       ##  Start sending this site in the background.
+ !     export SITE HOST LOCKS BATCHFILE PROGNAME PPID SIZE TMPDIR
+       sh -c '
+         BATCHFILE=${HOST}.nntp
+         LOCK=${LOCKS}/LOCK.${HOST}
+ --- 240,246 ----
+       fi
+   
+       ##  Start sending this site in the background.
+ !     export SITE HOST LOCKS BATCHFILE PROGNAME CPID SIZE TMPDIR
+       sh -c '
+         BATCHFILE=${HOST}.nntp
+         LOCK=${LOCKS}/LOCK.${HOST}
+ ***************
+ *** 247,253 ****
+         trap "rm -f ${LOCK} ; exit 1" 1 2 3 15
+         shlock -p $$ -f ${LOCK} || {
+             WHY="`cat ${LOCK}`"
+ !           echo "${PROGNAME}: [${PPID}:$$] ${HOST} locked ${WHY} `date`"
+             exit
+         }
+         if [ -f ${SITE}.work ] ; then
+ --- 247,253 ----
+         trap "rm -f ${LOCK} ; exit 1" 1 2 3 15
+         shlock -p $$ -f ${LOCK} || {
+             WHY="`cat ${LOCK}`"
+ !           echo "${PROGNAME}: [${CPID}:$$] ${HOST} locked ${WHY} `date`"
+             exit
+         }
+         if [ -f ${SITE}.work ] ; then
+ ***************
+ *** 254,259 ****
+ --- 254,260 ----
+             cat ${SITE}.work >>${BATCHFILE}
+             rm -f ${SITE}.work
+         fi
+ +       if [ -s ${SITE} ] ; then
+         mv ${SITE} ${SITE}.work
+         if ctlinnd -s -t30 flush ${SITE} ; then
+             cat ${SITE}.work >>${BATCHFILE}
+ ***************
+ *** 260,273 ****
+             rm -f ${SITE}.work
+             test -n "${SIZE}" && shrinkfile -s${SIZE} -v ${BATCHFILE}
+             if [ -s ${BATCHFILE} ] ; then
+ !               echo "${PROGNAME}: [${PPID}:$$] begin ${HOST} `date`"
+ !               echo "${PROGNAME}: [${PPID}:$$] innxmit ${INNFLAGS} ${HOST} ..."
+                 eval innxmit ${INNFLAGS} ${HOST} ${BATCH}/${BATCHFILE}
+ !               echo "${PROGNAME}: [${PPID}:$$] end ${HOST} `date`"
+             else
+                 rm -f ${BATCHFILE}
+             fi
+         fi
+         rm -f ${LOCK}
+       ' &
+       sleep 5
+ --- 261,275 ----
+             rm -f ${SITE}.work
+             test -n "${SIZE}" && shrinkfile -s${SIZE} -v ${BATCHFILE}
+             if [ -s ${BATCHFILE} ] ; then
+ !               echo "${PROGNAME}: [${CPID}:$$] begin ${HOST} `date`"
+ !               echo "${PROGNAME}: [${CPID}:$$] innxmit ${INNFLAGS} ${HOST} ..."
+                 eval innxmit ${INNFLAGS} ${HOST} ${BATCH}/${BATCHFILE}
+ !               echo "${PROGNAME}: [${CPID}:$$] end ${HOST} `date`"
+             else
+                 rm -f ${BATCHFILE}
+             fi
+         fi
+ +       fi
+         rm -f ${LOCK}
+       ' &
+       sleep 5
+ ***************
+ *** 275,278 ****
+   
+   wait
+   rm -f ${INPUT}
+ ! echo "${PROGNAME}: [${PPID}] stop"
+ --- 277,280 ----
+   
+   wait
+   rm -f ${INPUT}
+ ! echo "${PROGNAME}: [${CPID}] stop"
+ 
+ 
  ------------------------------
  
  Subject:  AIX tips
***************
*** 372,380 ****
  
  Q:  innwatch doesn't work well from /etc/inittab, does it?
  
! Q:  Nope.  Instead, you can create a "subsystem" with this command:
  
! mkssys -s innwatch -p /usr/local/news/bin/innwatch -u news -G news -S -n 15 -f 9
  
  Note that your path to innwatch may differ, depending on where you
  decided to install the inn components.  You also need to enter the
--- 514,522 ----
  
  Q:  innwatch doesn't work well from /etc/inittab, does it?
  
! A:  Nope.  Instead, you can create a "subsystem" with this command:
  
! mkssys -s innwatch -p /usr/local/news/bin/innwatch -u `id -u news` -G news -S -n 15 -f 9
  
  Note that your path to innwatch may differ, depending on where you
  decided to install the inn components.  You also need to enter the
***************
*** 392,398 ****
--- 534,580 ----
  
  Shane Castle <swcxt@boco.co.gov, swcxt@csn.org>
  
+ Q:  What can I change in innwatch.ctl to make it work right?
  
+ A:  "df" has output that is a little different than other systems.
+ Basicly, you want to 'print $3' (not 'print $4') when doing a "df" and
+ "df -i" lines should 'print $7' (not 'print $3').
+ 
+ Here are diffs:
+ 
+ *** innwatch.ctl        Wed Apr 20 23:17:58 1994
+ --- innwatch.ctl.aix    Mon Jul 11 14:28:34 1994
+ ***************
+ *** 28,40 ****
+   !load!+! uptime | tr -d ,. | awk '{ print $(NF - 2) }' ! gt ! 1500 ! pause ! loadav
+   
+   ##  If load is OK, check space (and inodes) on various filesystems
+ ! ##  =()<!!! df . | awk 'NR == 2 { print $4 }' ! lt ! @<INNWATCH_SPOOLSPACE>@ ! throttle ! No space (spool)>()=
+ ! !!! df . | awk 'NR == 2 { print $4 }' ! lt ! 8000 ! throttle ! No space (spool)
+   ##  =()<!!! df /nb/news2 | awk 'NR == 2 { print $4 }' ! lt ! @<INNWATCH_SPOOLSPACE>@ ! throttle ! No space (news.spool2)>()=
+   !!! df /nb/news2 | awk 'NR == 2 { print $4 }' ! lt ! 8000 ! throttle ! No space (news.spool2)
+ ! ##  =()<!!! df @<_PATH_BATCHDIR>@ | awk 'NR == 2 { print $4 }' ! lt ! @<INNWATCH_BATCHSPACE>@ ! throttle ! No space (newsq)>()=
+ ! !!! df /var/spool/news/out.going | awk 'NR == 2 { print $4 }' ! lt ! 800 ! throttle ! No space (newsq)
+ ! ##  =()<!!! df @<_PATH_NEWSLIB>@ | awk 'NR == 2 { print $4 }' ! lt ! @<INNWATCH_LIBSPACE>@ ! throttle ! No space (newslib)>()=
+ ! !!! df /usr/lib/news | awk 'NR == 2 { print $4 }' ! lt ! 20000 ! throttle ! No space (newslib)
+ ! ##  =()<!!! df -i . | awk 'NR == 2 { print $3 }' ! lt ! @<INNWATCH_SPOOLNODES>@ ! throttle ! No space (spool inodes)>()=
+ ! !!! df -i . | awk 'NR == 2 { print $3 }' ! lt ! 200 ! throttle ! No space (spool inodes)
+ --- 28,40 ----
+   !load!+! uptime | tr -d ,. | awk '{ print $(NF - 2) }' ! gt ! 1500 ! pause ! loadav
+   
+   ##  If load is OK, check space (and inodes) on various filesystems
+ ! ##  =()<!!! df . | awk 'NR == 2 { print $3 }' ! lt ! @<INNWATCH_SPOOLSPACE>@ ! throttle ! No space (spool)>()=
+ ! !!! df . | awk 'NR == 2 { print $3 }' ! lt ! 8000 ! throttle ! No space (spool)
+   ##  =()<!!! df /nb/news2 | awk 'NR == 2 { print $4 }' ! lt ! @<INNWATCH_SPOOLSPACE>@ ! throttle ! No space (news.spool2)>()=
+   !!! df /nb/news2 | awk 'NR == 2 { print $4 }' ! lt ! 8000 ! throttle ! No space (news.spool2)
+ ! ##  =()<!!! df @<_PATH_BATCHDIR>@ | awk 'NR == 2 { print $3 }' ! lt ! @<INNWATCH_BATCHSPACE>@ ! throttle ! No space (newsq)>()=
+ ! !!! df /var/spool/news/out.going | awk 'NR == 2 { print $3 }' ! lt ! 800 ! throttle ! No space (newsq)
+ ! ##  =()<!!! df @<_PATH_NEWSLIB>@ | awk 'NR == 2 { print $3 }' ! lt ! @<INNWATCH_LIBSPACE>@ ! throttle ! No space (newslib)>()=
+ ! !!! df /usr/lib/news | awk 'NR == 2 { print $3 }' ! lt ! 20000 ! throttle ! No space (newslib)
+ ! ##  =()<!!! df -i . | awk 'NR == 2 { print $7 }' ! lt ! @<INNWATCH_SPOOLNODES>@ ! throttle ! No space (spool inodes)>()=
+ ! !!! df -i . | awk 'NR == 2 { print $7 }' ! lt ! 200 ! throttle ! No space (spool inodes)
+ 
+ 
  ------------------------------
  
  Subject:  SunOS 4.1.2 tips
***************
*** 610,617 ****
  
  Subject:  Solaris 2.x special needs
  
! Under Solaris 2.x (where x = 0, 1, 2 or 3) you need to change
! the file "getfqdn.c".  Find the lines that read:
  
  	if (strchr(hp->h_name, '.') == NULL) {
  		/* Try to force DNS lookup if NIS/whatever gets in the way. */
--- 792,800 ----
  
  Subject:  Solaris 2.x special needs
  
! If "inews" outputs "Bad Message-ID" when posting Under Solaris 2.x
! (where x = 0, 1, 2 or 3) you need to change the file "getfqdn.c".  Find
! the lines that read:
  
  	if (strchr(hp->h_name, '.') == NULL) {
  		/* Try to force DNS lookup if NIS/whatever gets in the way. */
***************
*** 678,683 ****
--- 861,878 ----
  
  ------------------------------
  
+ Subject:  3Com Router users
+ 
+ If you observe strange behavior, like nnrpd locking and not sending
+ some articles to the clients, and if you find no clues about other
+ potential problems, then check your IP layer: some users have observed
+ bugs in the IP implementation of 3Com routers caused TCP
+ sessions lock outs.  You have very probably also NFS problems then.
+ Upgrading to the latest PROMs fixes this totally bizarre problem.
+ 
+ 
+ ------------------------------
+ 
  Subject:  NOV problems on a Pyramid
  
  Q:  I just turned on the overview stuff and I don't think news.daily is
***************
*** 703,720 ****
  
  Disclaimer:  First of all, if you have to set HAVE_UNIX_DOMAIN to DONT,
  YOU HAVE TO SET IT to DONT.  It's not a choice you can make, it's a
! description of the operating system that you purchased.  If you wrongly
! set this variable to DO your system isn't going to work *at* *all*.
  
! When you use the POST via NNTP, you are talking to nnrpd.  nnrpd cleans
! up your headers, adds the missing headers that it is allowed to add,
! checks whatever it checks, and then submits the finalized version to
! innd.  How does it talk to innd?
  If you have HAVE_UNIX_DOMAIN set to DO, nnrpd opens a Unix domain
  socket and sends the text.  At this point it is talking to innd
  somewhat like ctlinnd does.  innd can trust that the post isn't
  forged since it is coming from a program trustworthy enough to
  get to the socket (which isn't much).
  If you have HAVE_UNIX_DOMAIN set to DONT, it has no choice but to open
  a socket to port 119, issue the "IHAVE" command, and send the text that
  way (just like a remote newsreader).  This means that innd (not another
--- 898,918 ----
  
  Disclaimer:  First of all, if you have to set HAVE_UNIX_DOMAIN to DONT,
  YOU HAVE TO SET IT to DONT.  It's not a choice you can make, it's a
! description of the operating system that you've purchased.  If you've
! wrongly set this variable to DO your system isn't going to work *at*
! *all*.
  
! When you use POST (the NNTP command), you are talking to nnrpd.  nnrpd
! cleans up your headers, adds the missing headers that it is allowed to
! add, checks whatever it checks, and then submits the finalized version
! to innd.  How does it talk to innd?
! 
  If you have HAVE_UNIX_DOMAIN set to DO, nnrpd opens a Unix domain
  socket and sends the text.  At this point it is talking to innd
  somewhat like ctlinnd does.  innd can trust that the post isn't
  forged since it is coming from a program trustworthy enough to
  get to the socket (which isn't much).
+ 
  If you have HAVE_UNIX_DOMAIN set to DONT, it has no choice but to open
  a socket to port 119, issue the "IHAVE" command, and send the text that
  way (just like a remote newsreader).  This means that innd (not another
-- 
    Tom Limoncelli -- tal@warren.mentorg.com (work) -- tal@plts.org (play)

                   The internet is like a box of chocolates.

Technical Details
Message-ID: <inn-faq-changes-1-774676823@Warren.MENTORG.COM>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.answers.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!newsgw.mentorg.com!sdl!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <inn-faq-changes-1-774676823@Warren.MENTORG.COM>
Subject: Changes to INN FAQ Part 1/4: General Information
Date: Wed, 20 Jul 1994 04:00:23 +0000
From: tal@Warren.MENTORG.COM (Tom Limoncelli)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.answers.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!newsgw.mentorg.com!sdl!not-for-mail
Newsgroups: news.software.nntp,news.software.b,news.answers
Supersedes: <inn-faq-changes-1-773380810@Warren.MENTORG.COM>
Followup-To: news.software.nntp
Organization: Mentor Graphics - IC Group, Warren, NJ, USA
Lines: 364
Sender: tal@Warren.MENTORG.COM
Approved: news-answers-request@MIT.Edu
Distribution: world
Reply-To: Tom_Limoncelli@Warren.MENTORG.COM (Tom Limoncelli)
NNTP-Posting-Host: sdl.warren.mentorg.com