[rrd-users] Re: GPRINT max/average discrapancies
Day Dreamer
jmansukh at yahoo.com
Tue Dec 4 00:09:39 MET 2001
Hi,
Thanks for the reply. The site was handy as well.
I believe that the thought behind 14all.cgi is that
when a MAX'd value occur, the MAX'd percentage in
relation to the raw BW should also correspond to the
same data point. So, if the summarized MAX's data out
of MAX RRA point at time "A", the independently
calculated MAX'd percentage based on the AVERAGE RRA
should apply to the same data point "A".
In any case, I broke down my problem a bit more. The
concern lies w/ the Average percentage calculation.
Perhaps you can help clearify this since the reading
still didn't answer my questions.
I have a RRA:AVERAGE defined and RRA:MAX defined.
Typical MRTG w/ RRDtool. The difference is that my
RRA:AVERAGE is expetnded to 400 days worth of storage.
When I ploted my test data between 6days 6hours ago to
4days 20hours ago (picked this range to minimize other
data points) I get a MAX Output percentage of 25.46%.
My valid data did not start until approx. 4days
23hours ago. So the data points from that 400days ago
were all "NaN". Here is the rrdtool entry and the
sample data:
rrdtool graph /usr/local/apache/htdocs/test.png \
-s -6d6h -e -4d20h \
-a PNG -w 400 -h 100 -b 1000 --alt-y-grid \
-c MGRID#9e9e9e -c GRID#9e9e9e \
DEF:in=test.rrd:ds0:AVERAGE \
DEF:out=test.rrd:ds1:AVERAGE \
CDEF:fin=in,8,* \
CDEF:fout=out,8,* \
CDEF:pin=fin,19375000,/,100,*,8,/ \
CDEF:pout=fout,19375000,/,100,*,8,/ \
AREA:fin#00cc00:"Incoming Traffic(bps)\l" \
LINE1:fout#0000ff:"Outgoing Traffic (bps)\l" \
GPRINT:pin:MAX:"Maxed In AVG (%6.2lf%%)\l" \
GPRINT:pout:MAX:"Maxed Out AVG (%6.2lf%%)\l"
Epoch time, ds0:In (Bps), ds1 Out (Bps)
1006878600:,NaN,NaN
1006878900:,NaN,NaN
(the rest omitted)
1006998000:,NaN,NaN
1006998300:,NaN,NaN
1006998600:, 688448.45, 4931922.12
1006998900:, 716221.13, 5022481.76
1006999200:, 721633.56, 4566771.29
1006999500:, 601649.56, 4775940.98
1006999800:, 688346.54, 4542777.50
1007000100:, 658373.65, 4527143.32
1007000400:, 667892.51, 4448409.77
1007000700:, 641796.06, 4673579.23
1007001000:, 694659.49, 4197416.68
1007001300:, 671949.68, 4002321.90
However, when I graph out between -6d to -4d20h, my
"GPRINT:pout:MAX:"Maxed Out AVG (%6.2lf%%)\l"" output
changed from 25.46% to 25.92%. Why is that? In my
data points, I don't see any other data that can
change this. My assumption is that there is something
about the GPRINT option that I misunderstood. After
further testing, I noticed that as I increased the
range of the graph from -6d6h to -10d or -200d my
average is changing. Does GPRINT take into account of
the "NaN" entries? If it did, what value are they
counted as? Because if "NaN" are counted as 0 (zero)
then my average would dropped to almost 0% when I
spread it across 100+ days, but it didn't. Just
dropped by a few percentages. I'm lost. Any advise
from anyone would be greatly appreciated.
I know MRTG is not graular enough forcertain things an
that it's just an average, but I do want expect the
average over a pre-processed set of data points would
com out consistent.
BTW, if I graph these data over the time frame that I
have non-NaN (valid data points) then the GPRINT would
always come up with the correct number.
Thanks again.
Jeff
--- Alex van den Bogaerdt <alex at slot.hollandcasino.nl>
wrote:
>
> Day Dreamer wrote:
>
> > I just installed MRTG w/ RRDtool and 14all.cgi.
> They
> > are running but the mininal, maximal, average, and
> > current numbers displayed on the bottom of the
> graphs
> > are questionable a bit.
>
> rrdtool script has:
> DEF entries: in,out, min,mout bytes for
> average and maximum
> CDEF entries: fin,fout, fmin,fout bits for
> average and maximum
> CDEF entries: pin,pout percentage for
> average only
>
> Plotting:
> AREA fin, LINE1 fout mrtg compatible
> averages
>
> Printing:
> fmin,pin Maximal_In 12345.78 M
> (123.56%)
> fmout,pout Maximal_Out 12345.78 M
> (123.56%)
> fin,pin Average_In: 12345.78 M
> (123.56%)
> fout,pout Average_Out: 12345.78 M
> (123.56%)
> fin,pin Current_In: 12345.78 M
> (123.56%)
> fout,pout Current_Out: 12345.78 M
> (123.56%)
>
> > I only have data points for 3 days worth so any
> > additional days graphed are NaN or flat line as
> > expected. However, is I graphed this w/ "-s
> -10day"
> > as suppose to "-s -9day" I will get different
> pin:MAX,
> > puut:MAX, and other figures slightly between the
> > graphs.
>
> I looked again and found no "pmin","pmout" which I
> think
> are necessary to print the percentage for the
> maxima.
>
> > So, how exatly does GPRINT gather the data w/ cf
> set
> > to MAX, AVERAGE, and LAST?
>
> It seems to me this script is printing the maximum
> of
> the averages. If you did not already do so, check
> out my
> faq page (http://faq.mrtg.org/) and follow at least
> the
> first to links. This is where normalization,
> averaging
> etcetera is described. Also see the faq section, 4th
> link
> at configuring. While this is not exactly the case
> here
> it describes part of the problem.
>
> > In this example, pin is obrtain from
> DS=ds0:AVERAGE.
> > So, even though I'm performing GPRINT w/cf set to
> MAX,
> > it should still give me the largest data point
> within
> > ds0:AVERAGE, right?
>
> Only after consolidating. This will happen when the
> image is generated unless the time per pixel
> corresponds
> with a time per row in one of the RRAs.
>
> There can be four problem areas here:
> 1) mrtg
> 2) 14all.cgi
> 3) rrdtool
> 4) your understanding of averaging et al
>
> I think at least (2) and (4) are the case here. In
> both cases
> it is *almost* right. In order to improve (4) you
> have to do
> just a bit more reading and experimenting. The
> problem at (2)
> can be one of the experiments: copy pin,pout to
> pmin,pmout and
> make the necessary other changes in the script. See
> if this at
> least solves the incorrect percentages. If so,
> you've found a
> bug; congratulations :) (note: the bug would be in
> the script
> or in the program creating it, 14all).
>
> When you've gained a better understanding of, and
> more experience
> with mrtg/14all/rrdtool, I suggest you start
> checking if you want
> to keep using MRTG. Especially at high rates and/or
> when you have
> special needs for graphing, it may be better to
> choose another
> front end for rrdtool.
>
> HTH
> --
>
>
__________________________________________________________________
> / alex at slot.hollandcasino.nl
> alex at ergens.op.het.net \
> | work
> private |
> | My employer is capable of speaking therefore I
> speak only for myself |
>
+----------------------------------------------------------------------+
> | Technical questions sent directly to me will be
> nuked. Use the list. |
>
+----------------------------------------------------------------------+
> | http://faq.mrtg.org/
> |
> | http://rrdtool.eu.org --> tutorial
> |
>
+----------------------------------------------------------------------+
>
> --
> 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
>
__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com
--
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