Article View: news.software.nntp
Article #48239over.view cruft buildup on a tradspool server
From: Jack Bryans
Date: Fri, 01 Sep 2000 23:46
Date: Fri, 01 Sep 2000 23:46
57 lines
2482 bytes
2482 bytes
It's surprising how much can build up in over.view over the years, and
expireover -s may not catch it. If you've got a tradspool server that's
been running for several years, try:
cd /var/spool/news/over.view
ls -Al rec/pets/cats/.overview comp/os/geos/.overview \
comp/os/linux/.overview comp/sys/be/.overview \
comp/lang/java/api/.overview comp/lang/java/misc/.overview
The following perl script, ovchk.pl, finds .overviews that don't have a
corresponding entry in the active file and active file entries w/o
.overviews in a couple of minutes. The latter case implies a newsgroup
that's never received any articles. The former could be a newsgroup that
was split, with the parent being rmgroup'd, in which case rm'ing the
.overview is the only cleanup needed, or the group could have gone away
entirely, in which case one or more sub-dirs can be removed both from the
over.view tree and the article tree.
#!/usr/local/bin/perl
# edit the next three assignments: path to the newspool over.view sub-dir,
# path to the active file, and path to gnu find
$ov = '/var/spool/news/over.view';
$active = '/usr/local/news/active';
$find = '/usr/local/bin/find';
chdir($ov);
open(OV,"$find . -name .overview |") ||
die "Can't find .overviews in $ov: $!\n";
open(ACTIVE,"egrep -v '=|[jx]\$' $active |") ||
die "Can't open $active: $!\n";
while (<ACTIVE>) {
($grp,$max,$min,$flg) = split;
$ng{$grp} = 1;
}
close ACTIVE;
while (<OV>) {
@grp = split(/\//);
pop(@grp);
shift(@grp);
$grp = join('.',@grp);
if ($ng{$grp}) {delete $ng{$grp}}
else {print($grp, " not in active\n")}
}
foreach $key (keys %ng) {
print($key, " has no .overview\n");
}
Jack
Technical Details
Message-ID:
<2h8ztb65fy.fsf@swift.csulb.edu>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!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.gv.tsc.tdk.com!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!enews.sgi.com!csulb.edu!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <2h8ztb65fy.fsf@swift.csulb.edu> Subject: over.view cruft buildup on a tradspool server Date: Fri, 01 Sep 2000 23:46:57 +0000 From: Jack Bryans <jbryans@swift.csulb.edu> 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!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.gv.tsc.tdk.com!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!enews.sgi.com!csulb.edu!not-for-mail Newsgroups: news.software.nntp Organization: Cal State Long Beach Lines: 56 NNTP-Posting-Host: swift.csulb.edu X-Newsreader: Gnus v5.4.37/XEmacs 19.16