[rrd-users] rrdgraph small datapoints & large graph values
Dan.Byers at magma.ca
Dan.Byers at magma.ca
Mon May 31 19:09:54 MEST 2004
howdy, if any of you rrd gurus could shed some light on this issue that
i've been having, i would be much in your debt:
i have the following def for the rrd:
RRDs::create ( $dbPath, "--start", $start, "--step", 300,
"DS:ifInOctets:COUNTER:600:0:U",
"DS:ifOutOctets:COUNTER:600:0:U",
"RRA:AVERAGE:0.5:1:17856", ## daily 5 min,
keep for 62 days
"RRA:MAX:0.5:1:288",
"RRA:AVERAGE:0.5:6:336", ## weekly 30 min
"RRA:MAX:0.5:6:336",
"RRA:AVERAGE:0.5:24:372", ## monthly 120
min, (2hr)
"RRA:MAX:0.5:24:372",
"RRA:AVERAGE:0.5:288:732", ## 2 years 24 hr
"RRA:MAX:0.5:288:732");
and i populate the in/out octets every 5 minutes
the following is an excerpt from the dump of one of my rrds as defined
above (the daily, 5 minute intervals):
<!-- 2004-05-31 10:50:00 EDT / 1086015000 -->
<row><v> 4.6666666667e-01 </v><v> 1.5866666667e+00 </v></row>
<!-- 2004-05-31 10:55:00 EDT / 1086015300 -->
<row><v> 2.8000000000e-01 </v><v> 2.0400000000e+00 </v></row>
<!-- 2004-05-31 11:00:00 EDT / 1086015600 -->
<row><v> 8.4000000000e-01 </v><v> 6.0400000000e+00 </v></row>
<!-- 2004-05-31 11:05:00 EDT / 1086015900 -->
<row><v> 3.7333333333e-01 </v><v> 8.5333333333e-01 </v></row>
<!-- 2004-05-31 11:10:00 EDT / 1086016200 -->
<row><v> 8.4000000000e-01 </v><v> 4.4156666667e+01 </v></row>
<!-- 2004-05-31 11:15:00 EDT / 1086016500 -->
<row><v> 4.6666666667e-01 </v><v> 1.4266666667e+00 </v></row>
<!-- 2004-05-31 11:20:00 EDT / 1086016800 -->
<row><v> 3.7333333333e-01 </v><v> 6.7893333333e+01 </v></row>
<!-- 2004-05-31 11:25:00 EDT / 1086017100 -->
<row><v> 2.8000000000e-01 </v><v> 1.9066666667e+00 </v></row>
<!-- 2004-05-31 11:30:00 EDT / 1086017400 -->
<row><v> 3.7333333333e-01 </v><v> 1.3333333333e+00 </v></row>
<!-- 2004-05-31 11:35:00 EDT / 1086017700 -->
<row><v> 2.8000000000e-01 </v><v> 3.6666666667e+00 </v></row>
<!-- 2004-05-31 11:40:00 EDT / 1086018000 -->
<row><v> 5.6000000000e-01 </v><v> 1.3600000000e+00 </v></row>
<!-- 2004-05-31 11:45:00 EDT / 1086018300 -->
<row><v> 1.1200000000e+00 </v><v> 2.0800000000e+00 </v></row>
<!-- 2004-05-31 11:50:00 EDT / 1086018600 -->
<row><v> 1.1200000000e+00 </v><v> 2.0800000000e+00 </v></row>
<!-- 2004-05-31 11:55:00 EDT / 1086018900 -->
<row><v> 2.8000000000e-01 </v><v> 1.2400000000e+00 </v></row>
<!-- 2004-05-31 12:00:00 EDT / 1086019200 -->
<row><v> 4.6666666667e-01 </v><v> 9.4666666667e-01 </v></row>
<!-- 2004-05-31 12:05:00 EDT / 1086019500 -->
<row><v> 2.8000000000e-01 </v><v> 9.2000000000e-01 </v></row>
<!-- 2004-05-31 12:10:00 EDT / 1086019800 -->
<row><v> 2.8000000000e-01 </v><v> 7.6000000000e-01 </v></row>
<!-- 2004-05-31 12:15:00 EDT / 1086020100 -->
<row><v> 2.8000000000e-01 </v><v> 6.3600000000e+00 </v></row>
<!-- 2004-05-31 12:20:00 EDT / 1086020400 -->
<row><v> 0.0000000000e+00 </v><v> 1.1466666667e+00 </v></row>
<!-- 2004-05-31 12:25:00 EDT / 1086020700 -->
<row><v> 8.4000000000e-01 </v><v> 3.3053333333e+01 </v></row>
there are some pretty small values being accumulated
and here is my code for plotting and graphing all this:
my @opts = ( "2117.png",
"--start", $start,
"--imgformat", "PNG",
"--width=700",
"--height=140",
"--color", "BACK#FFFFFF",
"--color", "SHADEA#FFFFFF",
"--color", "SHADEB#FFFFFF",
"--color", "GRID#CCCCCC",
"--color", "MGRID#CCCCCC", "--color", "FONT#000099",
"--x-grid", "DAY:1:HOUR:6:DAY:1:0:%b %d",
"DEF:ifInOctets=2117.rrd:ifInOctets:AVERAGE",
"DEF:ifOutOctets=2117.rrd:ifOutOctets:AVERAGE",
"CDEF:inOct=ifInOctets,8,*,1024,/",
"CDEF:outOct=ifOutOctets,8,*,1024,/",
"LINE1:inOct#FF0000:In Octets",
"LINE1:outOct#0000FF:Out Octets",
"DEF:maxInOctets=$rrdPath:ifInOctets:MAX",
"DEF:maxOutOctets=$rrdPath:ifOutOctets:MAX",
"CDEF:maxInOct=maxInOctets,8,*,1024,/",
"CDEF:maxOutOct=maxOutOctets,8,*,1024,/",
"LINE1:maxInOct#33FF33:Max In Octets",
"LINE1:maxOutOct#996633:Max Out Octets");
my @info = RRDs::graph @opts;
print "ERROR: " . RRDs::error() if (RRDs::error());
(i do have end and step times, but i omitted for brevity)
and this graph, with CDEF's converting the values to KBs, consists of
plotted values in the 0 - 800 MB range, massive spikes! for the example,
please check out the web address:
http://dan.magma.ca/temp/2117.png
even the rrdtool fetch will return the normal results:
1086015900: 3.7333333333e-01 8.5333333333e-01
1086016200: 8.4000000000e-01 4.4156666667e+01
1086016500: 4.6666666667e-01 1.4266666667e+00
1086016800: 3.7333333333e-01 6.7893333333e+01
1086017100: 2.8000000000e-01 1.9066666667e+00
1086017400: 3.7333333333e-01 1.3333333333e+00
1086017700: 2.8000000000e-01 3.6666666667e+00
1086018000: 5.6000000000e-01 1.3600000000e+00
1086018300: 1.1200000000e+00 2.0800000000e+00
1086018600: 1.1200000000e+00 2.0800000000e+00
1086018900: 2.8000000000e-01 1.2400000000e+00
1086019200: 4.6666666667e-01 9.4666666667e-01
1086019500: 2.8000000000e-01 9.2000000000e-01
1086019800: 2.8000000000e-01 7.6000000000e-01
1086020100: 2.8000000000e-01 6.3600000000e+00
1086020400: 0.0000000000e+00 1.1466666667e+00
1086020700: 8.4000000000e-01 3.3053333333e+01
1086021000: 3.7333333333e-01 1.3333333333e+00
1086021300: 3.7333333333e-01 1.4666666667e+00
1086021600: 8.5333333333e-01 3.0066666667e+00
1086021900: 5.6000000000e-01 6.6266666667e+00
1086022200: 2.8000000000e-01 1.2400000000e+00
1086022500: 3.7333333333e-01 2.9333333333e+00
which, when converted to KB's, are good values. however, the graph shows
values really out of whack.
there are a number of interfaces that i'm monitoring, and it's only one or
two of these interfaces that generate this kind of graph with the huge
values. all other's are showing their graphs as they should.
can anyone point out my error? i think i've been looking at this for too
long, and i'm surely missing something.
is it a problem with how small the values are, and my method of converting
to KB's?? i have tried to specify the max and min counter values in the
rrd definition (and the graph code), but that doesn't seem to work.
however, i could have also done that incorrectly.
thanks for any assistance you can provide!
Dan Byers
--
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