Article View: news.software.nntp
Article #4401Re: nnrpd v. history
From: Hugh Messenger
Date: Mon, 29 Jan 1996 00:00
Date: Mon, 29 Jan 1996 00:00
60 lines
2882 bytes
2882 bytes
Deeran Peethamparam wrote:
>
> In article <3105AC38.167E@garply.com>,
> Hugh Messenger <hippo@garply.com> wrote:
>
> >Config: Alpha, OSF 3.2, INN 1.4
> >
> >I'm having problems with /usr/local/news growing insanely large,
> >because of some "persistant" nnrpd's running for days, keeping the
> >"old" history files open.
>
> AIX 3.2.5, INN 1.4-sec
>
> Happens here, too.
>
> Have a cron job which kills old nnrpd's once every morning. Not the most
> optimal solution, but.... *sigh*
Jerry Aguire mailed me the following scheme, which I'll be experimenting
with "real soon now". I'll let you know how I get on.
Jerry Sez:
> My mods are buried in a script that does a lot of other things mostly
> related to the local environment. That script is an argument to news.daily
> so it runs it before running expire. One of the things it does is to
> create the expire.ctl file based on current disk usage.
>
> The basic scheme is that before expire runs one does:
>
> oh=`ls -i $arch/history.bak | awk '{print $1}'`
> ch=`ls -i history | awk '{print $1}'`
> if [ X$ch != X$oh ] ; then
> cp /dev/null history.bak
> fi
> rm -f history.bak
> ln history history.bak
>
> The check using "ls -i" is to verify that the history.bak is not
> a hardlink to the working history file. Wouldn't wan't to truncate
> that. This could happen if expire has some problem. In that case
> it would not do the history rename and the .bak link from the previous
> run would still point to history.
>
> This scheme leaves the history.bak around until the next expire run.
> That way running programs get a grace period, typically 24 hours,
> to continue with the old file. You don't really need the space until
> expire runs anyway. At that point the space is freed for expire to
> run with its two copies, history and history.n.
>
> You can use the same technique to manage history.dir and history.pag.
> The history.pag file can use up enough space to count.
>
> Jerry
It all looks good in theory. Lets see if OSF/1 will behave.
-- hugh
Technical Details
Message-ID:
<310D5478.1CFB@garply.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<3105AC38.167E@garply.com> <4eh9gg$2bdr@sheraton.asianconnect.com>Show Full Headers
Complete Article Headers
Message-ID: <310D5478.1CFB@garply.com> Subject: Re: nnrpd v. history Date: Mon, 29 Jan 1996 00:00:00 +0000 From: Hugh Messenger <hippo@garply.com> References: <3105AC38.167E@garply.com> <4eh9gg$2bdr@sheraton.asianconnect.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 137065374 Distribution: inet Content-type: text/plain; charset=us-ascii Organization: Net Results, Inc. Mime-version: 1.0 Newsgroups: news.software.nntp X-mailer: Mozilla 2.0b6a (X11; I; OSF1 V3.2 alpha)