🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #59725

Innreport - Readership Data Inconsistency

#59725
From: 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.


Technical Details
Message-ID: <3D45A271.180719CE@nospam.invalid>
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!news.chips.ibm.com!newsfeed.btv.ibm.com!news.btv.ibm.com!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <3D45A271.180719CE@nospam.invalid>
Subject: Innreport - Readership Data Inconsistency
Date: Mon, 29 Jul 2002 16:15:45 -0400
From: jn@nospam.invalid
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!news.chips.ibm.com!newsfeed.btv.ibm.com!news.btv.ibm.com!not-for-mail
Newsgroups: news.software.nntp
Organization: IBM Global Services North -- Burlington, Vermont, USA
Lines: 34
NNTP-Posting-Host: nimbus.btv.ibm.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.btv.ibm.com 1027973847 23954 9.66.53.213 (29 Jul 2002 20:17:27 GMT)
X-Complaints-To: news@btv.ibm.com
NNTP-Posting-Date: 29 Jul 2002 20:17:27 GMT
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en