Article View: news.software.nntp
Article #36414Re: Logging the data-throughput of a client ...
From: Brad Knowles
Date: Thu, 08 Apr 1999 00:00
Date: Thu, 08 Apr 1999 00:00
85 lines
3714 bytes
3714 bytes
[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]
In article <7ei3g5$io2$1@goof.de.uu.net>, "Van-Thieu Tran"
<vtt@de.uu.net> wrote:
> We are running our News-Server under INN 1.7.x .
> My question : is it possible to measure the data-throughput of a client ?
> Some client (using normal Newsclient like Outlook) get > 200 000 Articles a
> day
> and we want to find out, how much data he has "sucked".
> Reason : for statistik only
For INN 2.2 (this may or may not work with older versions), the
following script should calculate some useful statistics from the
news.notice log file (assuming you're keeping this log file around).
I'm sure it would need modification for your purposes, but at least
this is a start:
#!/usr/local/bin/perl
open(F,"</usr/local/news/log/news.notice");
while(<F>)
{
chomp;
if (/artstats get (\d+) time (\d+) size (\d+)/)
{
$num+=$1;
$time+=$2;
$size+=$3;
}
elsif (/group (\S+) (\d+)/)
{
my $name, $count;
$name = $1;
$count = $2;
$group{$name}{count}+=$count;
if ($group{$name}{count} == $count)
{
$group{$name}{name} = $name;
}
@subgroups = split /\./, $group{$name}{name};
undef $sofar;
foreach $subgroup (@subgroups)
{
if (!defined $sofar)
{
$sofar=$subgroup;
}
else
{
$sofar=$sofar.".".$subgroup;
}
$group{$sofar}{count} += $count;
if ($group{$sofar}{count} == $count)
{
$group{$sofar}{name} = $sofar;
}
}
}
}
close(F);
print "$num articles retreived\n$size bytes\n$time seconds of
session\n";
foreach $newsgroup (reverse sort bycount keys %group)
{
printf "%10d: $group{$newsgroup}{name}\n",
$group{$newsgroup}{count};
}
sub bycount
{
$group{$a}{count} <=> $group{$b}{count};
}
--
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
<http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0xE38CCEF1>
Are you looking for a news feed from a site in the Freenix Top 130?
If so, contact me via private e-mail for details.
Technical Details
Message-ID:
<080419991707237526%brad@shub-internet.org>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:
<7ei3g5$io2$1@goof.de.uu.net>Show Full Headers
Complete Article Headers
Message-ID: <080419991707237526%brad@shub-internet.org> Subject: Re: Logging the data-throughput of a client ... Date: Thu, 08 Apr 1999 00:00:00 +0000 From: Brad Knowles <brad@shub-internet.org> References: <7ei3g5$io2$1@goof.de.uu.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-mail X-Deja-AN: 464055013 Content-Transfer-Encoding: 8bit Mail-Copies-To: poster To: "Van-Thieu Tran" <vtt@de.uu.net> Posted-And-Mailed: yes Content-Type: text/plain; charset=ISO-8859-1 X-Complaints-To: abuse@skynet.be X-Trace: news0.skynet.be 923584097 23591 195.238.1.121 (8 Apr 1999 15:08:17 GMT) Organization: Shub-Internet http://www.shub-internet.org/ X-URL: http://www.shub-internet.org/ User-Agent: YA-NewsWatcher/3.1.8 Mime-Version: 1.0 NNTP-Posting-Date: 8 Apr 1999 15:08:17 GMT Newsgroups: news.software.nntp