[rrd-users] Re: RRD Fetch always shows Nan
Phil.Daws at daimlerchryslerservices-it.co.uk
Phil.Daws at daimlerchryslerservices-it.co.uk
Thu Oct 10 11:45:13 MEST 2002
Okay I have tried that and here are the results :
# /opt/rrdtool-1.0.33/bin/rrdtool update /portal/content/mrtg/appresponse.rrd
1033456603:23364
# /opt/rrdtool-1.0.33/bin/rrdtool fetch /portal/content/mrtg/appresponse.rrd MAX
-s 1033456603 -e 1033456603
login
1033456500: nan
1033456800: nan
# /opt/rrdtool-1.0.33/bin/rrdtool update /portal/content/mrtg/appresponse.rrd
1033456800:23364
# /opt/rrdtool-1.0.33/bin/rrdtool fetch /portal/content/mrtg/appresponse.rrd MAX
-s 1033456603 -e 1033456603
login
1033456500: nan
1033456800: 2.3364000000e+04
So it would seem that because the update does not fall on the true 5 minute
epoch that it disregards the data. Does this mean that I have to change the
data so
that it always falls @ 5 minute intervals ?
Thanks
Alex van den Bogaerdt <alex at ergens.op.het.net> on 10/10/2002 10:16:40
To: rrd-users at list.ee.ethz.ch
cc: (bcc: Phil Daws/UKDPS/DEBISFSREG2)
Subject: [rrd-users] Re: RRD Fetch always shows Nan
On Thu, Oct 10, 2002 at 09:51:35AM +0100,
Phil.Daws at daimlerchryslerservices-it.co.uk wrote:
> 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 ?
In your script: generate a log file of commands you execute
(or: would like to execute).
Then use this file to debug the update process step by step.
> my ($day,$month,$year,$time,$response,$type) = split (" ",$_);
> if ($type =~ /Login/ && $response > 0) {
> $date=&ParseDateString("$day $month $year $time");
> $epoch=&UnixDate($date,"%s");
> $response=int($response);
It seems as if "epoch" becomes 1009839600 and similar.
"response" becomes 23364. At least, that's what it looks
like to me. Verify this.
> printf("%s %s\n",$epoch,$response);
Why not do: printf("rrdtool update %s %s:%s\n",$rrd,$epoch,$response);
> RRDs::update("$rrd","$epoch:$response");
> my $e = RRDs::error();
> die "ERROR: Cannot update $rrd with '$epoch:$response' $e\n" if $e;
Not sure if this will report a logical error. It will report a hard
error such as "file not found" et al.
Create the database by hand and then update using the printf()ed
commands. After each update, check using rrdtool info. Maybe even
do a rrdtool dump and check its contents (your fetch command may
be wrong !!!)
HTH
Alex
--
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
******************************************************************************
CONFIDENTIALITY STATEMENT
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.
CONFIDENTIALITY STATEMENT
******************************************************************************
--
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