[rrd-users] Predicting based on averages?

Michael Wells michael at wells.org.uk
Fri Aug 17 16:50:08 MEST 2001


Hi,

I'm forwarding this back to the list as a number of people asked about it.
:-)

Here is the script I used, slightly changed so that it stands alone without
the scripts I already have to support it. My network card is called "rl0",
and I have stored two COUNTER values in the file rl0.rrd (input and output,
which are octet counters).

rrdtool graph totaltraffic_month.png -v "Bytes/sec" --start -2419200 --title
"Combined network traffic, 28 days" \
                DEF:rl0in=rl0.rrd:input:AVERAGE \
                DEF:rl0out=rl0.rrd:output:AVERAGE \
                AREA:rl0in#00CC00:"Total inbound traffic" \
                LINE2:rl0out#CC0000:"Total outbound traffic" \
                CDEF:combined=totalout,totalin,+ \
                CDEF:moncm=combined,2419200,* \
                CDEF:monin=totalin,2419200,* \
                CDEF:monout=totalout,2419200,* \
                "COMMENT:\\n" \
                "COMMENT:\\n" \
                "GPRINT:monin:AVERAGE:Estimated 28 day throughput %8.2lf %s
inbound\\n" \
                "GPRINT:monout:AVERAGE:Estimated 28 day throughput %8.2lf %s
outbound\\n" \
                "GPRINT:moncm:AVERAGE:Estimated 28 day throughput %8.2lf %s
combined\\n" \
	> /dev/null

Notice that 2419200 is the number of seconds in a month, so it is possible
to plot different time frames just by changing that. The RPNs in the CDEFs
can be reduced to a smaller number of statements, but the ideas should be
clear. The output of this plot is a graph with input and output lines, and
then in legend, three items showing the moving average for total throughput
in the period displayed.

I cannot think of a way to plot the moving average itself! As you can see
above, I'm relying on the AVERAGE function in GPRINT to get the information
I want.

Regards
Michael


--
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