🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
2 messages
2 total messages Started by Van-Thieu Tran Thu, 08 Apr 1999 00:00
Logging the data-throughput of a client ...
#36421
Author: Van-Thieu Tran
Date: Thu, 08 Apr 1999 00:00
14 lines
927 bytes
Hi erveryone,
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

tnx,
Van-Thieu Tran



Re: Logging the data-throughput of a client ...
#36414
Author: Brad Knowles
Date: Thu, 08 Apr 1999 00:00
85 lines
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.

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