Article View: news.software.nntp
Article #26387Re: filtering/censoring marginal groups
From: System Operator
Date: Wed, 18 Feb 1998 00:00
Date: Wed, 18 Feb 1998 00:00
87 lines
3431 bytes
3431 bytes
<patricks@support.nl> writes:
>On Tue, 17 Feb 1998, Jeff Garzik wrote:
>> : > Some transit sites have maximum article size limits. If you only have a
>> : > couple of feeds, and you're behind feeders with size limits, that could
>> : > be the reason.
>>
>>
>> : How do they do that ;-) I'm interested in doing so. I'm running
>> : INN insync 1.7.2. Please let me know.
><snip>
>Major bummer! I really need to learn how to read ;-)
>What i am interested in, is a maximum number of articles in a
>newsgroup, not the article size. I think 1000 articles per
>alt.binaries.pictures.* group is more than enough. If there are
>more than this number of articles in the group, ignore them.
>Nobody is able to "read" this number of articles in a day.
>And how really wants to?
>-Patrick.
I wrote a quick perl script to print out the groups with a large number
of articles over a certain limit. Perhaps this would help? The script
looks at the active file first for groups that have a large enough
gap between low and high numbers, and then goes and counts those groups
to see if they're really that large. There could well be an easier
and more established way.
I'll attach the script below, in case it's of help.
Ann Cantelow
cantelow@athena.csdco.com
sysop@csd.net
(You can tweak the lower limit of number of articles in a group to
report by changing the $limit variable.)
----------------------------------------------------
#! /usr/bin/perl -w
open ACT, "/usr/news/active" or die "can't find active file.";
$limit = 6000; # lower limit of counts to report
print "\nGroups with more than $limit articles:\n\n";
$groupcount = 0;
printf "%-45s %10s\n", "Group", "Articles";
$gtot = 0;
while ($line = <ACT>) {
chop $line;
($group, $high, $low) = split /\s+/, $line;
unless ($high =~ /\d+/ && $low =~ /\d+/) {
print "non-num line numbers: $line\n";
next;
}
$num = $high - $low;
if ($num > $limit) {
# is this for real?
$dirname = $group;
$dirname =~ s/\./\//g;
$dirname = "/var/spool/news/$dirname";
unless (opendir GDIR, $dirname) {
print "(can't open $dirname -- skipping.)\n";
next;
}
@filelist = grep !/^\.\.?/, readdir GDIR;
closedir GDIR;
$count = scalar(@filelist);
if ($count > $limit) {
printf "%-45s %10d\n", $group, $count;
$gtot += $count;
}
$groupcount++;
}
}
close ACT;
printf "\n%-45s %10d\n", "Total:", $gtot;
print "\n(Counted $groupcount directories.)\n\n";
Technical Details
Message-ID:
<6cf6nj$sbq$1@apollo.csd.net>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:
<34E88156.7F3611D6@graves.com> <gS%F.6$Vd6.2358@newsbastard.gunslinger.net> <Pine.BSI.3.95.980217082255.23931B-100000@unit11.support.nl> <hbjG.1$6H5.211425@news2.teleport.com> <Pine.BSI.3.95.980217204006.11989C-100000@unit11.support.nl>Show Full Headers
Complete Article Headers
Message-ID: <6cf6nj$sbq$1@apollo.csd.net> Subject: Re: filtering/censoring marginal groups Date: Wed, 18 Feb 1998 00:00:00 +0000 From: sysop@atlas.csd.net (System Operator) References: <34E88156.7F3611D6@graves.com> <gS%F.6$Vd6.2358@newsbastard.gunslinger.net> <Pine.BSI.3.95.980217082255.23931B-100000@unit11.support.nl> <hbjG.1$6H5.211425@news2.teleport.com> <Pine.BSI.3.95.980217204006.11989C-100000@unit11.support.nl> 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: 326290328 Distribution: inet Organization: Computer Systems Design Company Newsgroups: news.software.nntp