🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #637

Re: Trouble with article counts

#637
From: Kim F. Storm
Date: Mon, 25 Jun 1990 10:53
83 lines
3672 bytes
tih@barsoom.nhh.no (Tom Ivar Helbekkmo) writes:

>Seems to me that there's a bit of trouble with article counts here and
>there...  More specifically, NNs idea of how many articles it has is
>exagerrated; it starts out right, and then just keeps increasing.

I suppose that you are refering to the article count reported by
nnadmin's (S)tat command.  It tells you how many articles are recorded
in nn's database, so you better believe it :-)

If it is (a lot) higher than then number of actual news articles, then
it indicates that the database is not expired properly - and looking
at the commands you use, it isn't!

Maybe the installation guide isn't explicit enought about this, but
the only way to accomplish a full expire on all groups in the database
is to execute the following command after the news expire has completed:

	nnadmin =EYW

(Running nnmaster -F "" is an alternative though, but you have to be
more careful to ensute that another nnmaster is not already running)

>Here's the script I run nightly -- the double killing of the running
>master is there because the first try sometimes fails, but the second
>try will always succeed:

>	/usr/lib/nn/nnmaster -k
>	/usr/lib/nn/nnmaster -k
>	/usr/lib/nn/back_act
>	/usr/lib/news/trimlib
>	/usr/lib/news/expire -e 7 -E 14
>	/usr/lib/nn/nnmaster -u -i -e1 -E -LC -f
>	/usr/lib/nn/nnmaster -r -C -B -O42

I don't know why you need to kill it twice (I've heard about the problem
before, but haven't been able to explain it).

I have several comments to your script:

1)  Unless you intend to run "nnmaster -F", there is no need to stop
    nnmaster while news/expire is running.

2)  Running nnmaster -e1 is not a safe way to ensure that expire is
    run on all groups - it will only apply to groups where the "min"
    field is updated by expire, and experience shows that this is a
    very unreliable way to detect expiration in a group!

3)  The -O42 will probably not have any effect, since only new articles
    which are added to the database are checked - and I can't imagine
    any new articles that are not seen by nnmaster within 42 days.
    So the -O option is intended to be used only when you initialize
    the database (i.e. on the first run after nnmaster -I).

So here is my recommendation:

A)  Either run nnmaster permanently, started from /etc/rc with the
    following options:

	.../nnmaster -r -h -B -C

    (-h is a new option in patch #6 to avoid racing with rnews)
    and execute nnadmin =EYW from you script after news/expire has
    finished:

	/usr/lib/nn/back_act
	/usr/lib/news/trimlib
	/usr/lib/news/expire -e 7 -E 14
	/usr/bin/nnadmin =EYW

B)  Or use the -F option to get an unconditional expiration

	/usr/lib/nn/nnmaster -k
	/usr/lib/nn/nnmaster -k
	/usr/lib/nn/back_act
	/usr/lib/news/trimlib
	/usr/lib/news/expire -e 7 -E 14
	/usr/lib/nn/nnmaster -u -i -F ""
	/usr/lib/nn/nnmaster -r -h -C -B

-- 
Kim F. Storm  <storm@texas.dk>		No news is good news,
Texas Instruments A/S, Denmark		  but nn is better!
Technical Details
Message-ID: <607@texas.dk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!sunic!dkuug!tidk!storm
References: <939@barsoom.nhh.no>

Show Full Headers
Complete Article Headers
Message-ID: <607@texas.dk>
Subject: Re: Trouble with article counts
Date: Mon, 25 Jun 1990 10:53:41 +0000
From: storm@texas.dk (Kim F. Storm)
References: <939@barsoom.nhh.no>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!sunic!dkuug!tidk!storm
Newsgroups: news.software.nn
Distribution: news
Organization: Texas Instruments, Denmark
Lines: 83
Posted: Mon Jun 25 11:53:41 1990