🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #59724

innreport Readership Inconsistency?

#59724
From: jnetzel
Date: Mon, 29 Jul 2002 19:54
35 lines
2418 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: <3D459D6D.48859714@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!logbridge.uoregon.edu!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!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: <3D459D6D.48859714@nospam.invalid>
Subject: innreport Readership Inconsistency?
Date: Mon, 29 Jul 2002 15:54:21 -0400
From: jnetzel@btv.ibm.com
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!logbridge.uoregon.edu!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!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 1027972563 22774 9.66.53.213 (29 Jul 2002 19:56:03 GMT)
X-Complaints-To: news@btv.ibm.com
NNTP-Posting-Date: 29 Jul 2002 19:56:03 GMT
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en