[rrd-users] Re: rrdfetch ?
Warrick FitzGerald
wfitzgerald at livetechnology.com
Fri Sep 20 09:14:57 MEST 2002
Ahh thanks very much, dough ... ok here's another question :
After understanding what the diff betweent he GUAGE and the COUNTER is, I
decided to try anither test.
I took the example database and modified it to be a GUAGE using the
following script :
rrdtool create test3.rrd --start 1032505063 DS:speed:GAUGE:600:U:U
RRA:AVERAGE:0.5:1:24 RRA:AVERAGE:0.5:6:10
Then I wrote a little perl script that looks like this to insert some dummy
date into the DB
#!/usr/bin/perl -w
$count=0;
$internal=time;
while (1<2) {
$count++;
$internal = $internal+300;
$ins = "rrdtool update test3.rrd ".$internal.":".rand();
print $ins."\n";
system $ins;
}
This ran fine, and looked like it while running ... ended looking something
like this
.....
.....
rrdtool update test3.rrd 1033019292:0.480894541488539
rrdtool update test3.rrd 1033019592:0.843271136148882
rrdtool update test3.rrd 1033019892:0.973486299364261
rrdtool update test3.rrd 1033020192:0.985733942306997
So at the end of the day I'm expecting to find data starting at 1032505063
(09/19/2002 22:57:43) and ending at 1033020192 (09/25/2002 22:03:12)
Now this is the part I dont understand :
I run : rrdtool fetch test3.rrd AVERAGE --start 1032505063 --end 1033020192
1032991200: nan
1032993000: nan
1032994800: nan
1032996600: nan
1032998400: nan
1033000200: nan
1033002000: 2.1193212050e-01 -- 09/25/2002 17:00:00
1033003800: 6.1997140180e-01 -- 09/25/2002 17:30:00
1033005600: 4.5289713441e-01
1033007400: 2.3713225135e-01
1033009200: 4.3626931302e-01
1033011000: 6.9722100099e-01
1033012800: 4.3067984356e-01
1033014600: 4.2780492831e-01
1033016400: 6.5593521975e-01
1033018200: 7.2131063874e-01
1033020000: nan
1033021800: nan
But from what I understand I have created two RRA's in the is DB, so how
does it know which one I want, and how do I tell it to return the other ? I
read the man page, but simple cant figure out how the resolution works ... I
get the same output every time.
Thanks
Warrick
----- Original Message -----
From: "Mike Edmonds" <mikee at lancom.co.nz>
To: "Warrick FitzGerald" <wfitzgerald at livetechnology.com>;
<rrd-users at list.ee.ethz.ch>
Sent: Thursday, September 19, 2002 10:55 PM
Subject: [rrd-users] Re: rrdfetch ?
>
> Hi
>
> I'm a beginner at this but here are my thoughts
>
> Your datasource is a COUNTER. Thus it only holds the difference between
> two values
> That is the difference between your first two entries is 12 (12357 -
> 12345)
> Your database holds the AVERAGE (per second) over the time period
> (300secs)
>
> Thus 12/300 = 0.04 = 4e-02.
>
> NAN simply says that there is nothing to average since there is only one
> entry. I think the tutorial covers this point.
>
> Hope this help.
>
> Mike Edmonds
>
> -----Original Message-----
> From: Warrick FitzGerald [mailto:wfitzgerald at livetechnology.com]
> Sent: Friday, 20 September 2002 2:41 p.m.
> To: rrd-users at list.ee.ethz.ch
> Subject: [rrd-users] rrdfetch ?
>
>
> Hi All,
>
> I know someone is going to kick me for this, but why when I follow the
> example tutorial on the rrdtool.org site
>
> see:
> http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/tutorial/rrdtutorial.
> html
>
> I create the db as explained
> rrdtool create test.rrd --start 920804400 DS:speed:COUNTER:600:U:U
> RRA:AVERAGE:0.5:1:24 RRA:AVERAGE:0.5:6:10
>
> I insert some test date as explained
> rrdtool update test.rrd 920804700:12345 920805000:12357 920805300:12363
> rrdtool update test.rrd 920805600:12363 920805900:12363 920806200:12373
> rrdtool update test.rrd 920806500:12383 920806800:12393 920807100:12399
> rrdtool update test.rrd 920807400:12405 920807700:12411 920808000:12415
> rrdtool update test.rrd 920808300:12420 920808600:12422 920808900:12423
>
> However, when I try and fetch the data, I get the following :
>
> 920804400: nan
> 920804700: nan
> 920805000: 4.0000000000e-02
> 920805300: 2.0000000000e-02
> 920805600: 0.0000000000e+00
> 920805900: 0.0000000000e+00
> 920806200: 3.3333333333e-02
> 920806500: 3.3333333333e-02
> 920806800: 3.3333333333e-02
> 920807100: 2.0000000000e-02
> 920807400: 2.0000000000e-02
> 920807700: 2.0000000000e-02
> 920808000: 1.3333333333e-02
> 920808300: 1.6666666667e-02
> 920808600: 6.6666666667e-03
> 920808900: 3.3333333333e-03
> 920809200: nan
>
> 1. Why is my timeslot 920804700 = nan ?
> 2. Why do all the numbers look weird (ie. I inserted an integer and got
> some
> strange output ??)
>
> Thanks
> Warrick
>
>
>
>
> --
> 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
>
> --
> 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
>
>
>
--
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