[rrd-users] NNTP Statistics -wierd numbers appearing ?

Brian Ipsen bipsen at nerdnet.dk
Mon Jul 30 00:52:12 MEST 2001


Hi!

 I trying to gather information about usenet postings on a NNTP-server. So
far it runs almost like I want to, except that I sometimes get very wierd
numbers in the databse.

The database hase been created like:

rrdtool create NntpDb.rrd DS:dk-binaer-musik:COUNTER:36000:0:U
RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775
RRA:MAX:0.5:288:797

(the RRA values has been taken from MRTG, I hope they fit the data for
daily, weekly, monthly and yearly statistics :-))

The info from the NNTP server is gathered like this:

#!/usr/local/bin/perl -w

use News::NNTPClient;
require 'RRDs.pm';
$server1 = "news.tele.dk";
$c1 = new News::NNTPClient("$server1");

$group = "dk.binaer.musik";
($first, $last) = ($c1->group("$group"));
if(defined($first))
{
   $diff = $last-$first;
   print "$group First: $first   Last: $last    Diff: $diff\n";
   my $dkbinmusik = $last;
   undef $diff;
   undef $first;
   undef $last;
}
else
{
   print "No reply from $group ! \n";
   my $dkbinmusik = 0;
}

my $rrd = "NntpDb.rrd";
my $time = time;

RRDs::update("$rrd", "$time:$dkbinmusik");
my $e = RRDs::error();
die "ERROR: Cannot update $rrd with '$time:$dkbinmusik' $e\n" if ($e);

But somehow very wierd values shows up in the database (check the values
below - especially the middle one) - The values should be multiplied with
300 to provide the number of articles posted within 5 minutes:

 996433500: 9.0733333333e-002
 996433800: 9.0000000000e-002
 996434100: 1.3836838984e+007
 996434400: 6.4444444444e-002
 996434700: 6.4230343300e-002

What could be the cause of this problem ?? If the data from the NNTP server
somehow is unavailable, should I then add the last stored value (requires
fetch from the rrd), or should I simply not update the database (what's
recommended) ?

/Brian




--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list