🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by James Rippas Fri, 05 Sep 1997 00:00
Articles not being removed
#21306
Author: James Rippas
Date: Fri, 05 Sep 1997 00:00
16 lines
966 bytes
Hi, 

I can't figure out why I seem to have a group of messages 6-9months old
that won't go away.  I'm remembering for 14 days and the entry in
expire.ctl look like such; *:A:15:15:15.   Of the messages that I can't
get rid of some are readable, the other are just headers that say "bad
article number" when they are read. 

Any help appreciated. 

Thanks, 

-jim

Re: Articles not being removed
#21320
Author: Rahul Dhesi
Date: Sat, 06 Sep 1997 00:00
42 lines
2267 bytes

I normally do something like this once every few months:

   find `cat List` -type f -mtime +60 -print | xargs rm -f

where List contains the top-level directories that I want to traverse.
(It excludes local group hierarchies that I may want to keep for a long
time).

Other solutions to find orphan postings make for technically interesting
challenges, but the above seem to be simple and it works.  If I'm in the
mood I will sort and fastrm the output, but the number of orphaned
articles (usually caused when a filesystem became full and history
entries are corrupted; or if the articles have bad message-ids that are
lost when fixhist is run) usually isn't big enough to be worth it.

I also keep around a little program I call bsort (batched sort):

   #! /some/path/perl
   # tested only with perl 4.036
   # Rahul Dhesi <dhesi@bsort.boxmail.com>
   $LIMIT = shift || 2000;
   $count = 0;
   while (<>) { push(@list, $_); if ($count++ > $LIMIT) {
	 @out = sort @list; @list= (); print @out; $count = 0; } }
   if (@list > 0) { @out = sort @list; print @out; }

It sorts input to output in $LIMIT-line pieces and is good for
optimizing unlinks and other operations without collecting the entire
input stream and without needing temp disk space.  It's also good for
sorting outgoing batches for backlogged sites, thus speeding up
filesystem accesses, without completely losing the FIFO ordering of the
batched filenames.

A nice pipeline would then be:

   find `cat List` -type f -mtime +60 -print | bsort | xargs rm -f
-- 
Rahul Dhesi <dhesi@spams.r.us.com>

Re: Articles not being removed
#21444
Author: Jerry Aguirre
Date: Thu, 11 Sep 1997 00:00
19 lines
1442 bytes
In article <5us89s$rrp$1@samba.rahul.net>,
Rahul Dhesi <c.c.eiftj@87.usenet.us.com> wrote:
>   find `cat List` -type f -mtime +60 -print | bsort | xargs rm -f

The output of find is already in the optimal order for fastrm.  What
fastrm really wants is the list in directory order, not alphabetical
sorting order.  Directory order is what find generates.

The exception would be when find recurses down a directory.  It would
be better to do all the files in a directory before doing the
subdirectories.  But I expect this is a minor performance hit.

The advantage of sorting is when the input list has no relationship to
directory structure.  The ouput of expire and outgoing queues are in 
article arrival order.  This will wildly jump from directory to directory
causing the cache to thrash and the disk to seek.

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads