[rrd-users] RRD Fetch always shows Nan

Phil.Daws at daimlerchryslerservices-it.co.uk Phil.Daws at daimlerchryslerservices-it.co.uk
Thu Oct 10 10:51:35 MEST 2002

Hi :

We have some historic data that we want to add into RRD .... The format of the
data is as follows :

01 Oct 2002 08:16:43 23364 Login
01 Oct 2002 08:21:32 12067 Login

The script I am using to populate is detailed below, but when I fetch the data
back it always shows as NaN ... Cannot work out what I am doing wrong ?


#! /bin/perl -w
# -*- mode: Perl -*-

use Date::Manip;
use lib qw(/opt/rrdtool-1.0.33/lib/perl);
use RRDs 1.000011;

my $rrd="/portal/content/mrtg/appresponse.rrd";
my @args = ($rrd, '-b', 1009839600, '-s', 300,
my $e = RRDs::error();
die "ERROR: Cannot create logfile: $e\n" if $e;

open(INFILE, "/logs/01 Oct 2002 TransactionChecks.log") or die "Cannot open
while (<INFILE>) {
        my ($day,$month,$year,$time,$response,$type) = split (" ",$_);
        if ($type =~ /Login/ && $response > 0) {
                $date=&ParseDateString("$day $month $year $time");
                printf("%s %s\n",$epoch,$response);
                my $e = RRDs::error();
                die "ERROR: Cannot update $rrd with '$epoch:$response' $e\n" if

close INFILE;


This email, its content and any files transmitted with it are intended
solely for the addressee(s) and may be legally privileged and/or
confidential. Access by any other party is unauthorised without the
express written permission of the sender. If you have received this
email in error you may not copy or use the contents, attachments
or information in anyway. Please destroy it and contact the sender
on  0870 840 5000 or via email return. This email has been
prepared using information believed by the author to be reliable
and accurate, but DaimlerChrysler Services UK Ltd. makes no
warranty as to accuracy or completeness. In particular
DaimlerChrysler Services UK Ltd. does not accept responsibility for
changes made to this email after it was sent. Any opinions
expressed in this document are those of the author and do not
necessarily reflect the opinions of DaimlerChrysler Services UK Ltd,
or its affiliates. 


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