🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by jn Mon, 29 Jul 2002 20:15
Innreport - Readership Data Inconsistency
#59725
Author: jn
Date: Mon, 29 Jul 2002 20:15
35 lines
2435 bytes
As part of a customers SLA, I was required to generate dynamic
readership metrics for NNTP traffic. Instead of hacking innreport, I
opted to write a quick perl script that essentially went through
news.notice on a daily basis, parsed the data, then returned the number
of reads. This information is appended to a file that can is accessed by
a CGI script that graphs the data dynamically for trending info etc.

The program works fine with one exception: the readership count data is
slightly smaller than the "NNRP readership statistics"  total as
reported in the 'news-notice.<date-string>.html '. Here is the heart of
the script that totals the readership count. In a nutshell, I am
searching for the "group" keyword, inserting matching log entries into
an array, then tokenizing and summing the final field.

$total = 0;
$infile = "news.notice.1.gz";
$include = ' | grep ';

@RAWDATA = `gzcat $infile $include ' group '`;

  foreach $item (@RAWDATA) {
     chomp($item);
     @SERVERDATA = split (" ", $item);
     $total += @SERVERDATA[8];
  }

I have checked and rechecked the raw output. The code does exactly what
it's supposed to. Could there be something in news.notice that I am
missing or does innreport generate readership data from more than one
source?

Any help is greatly appreciated.


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