[rrd-users] rrdtool export

Rick Blundell rickb at servercove.com
Tue Mar 2 07:36:35 MET 2004


Hello everyone. I wish to extract an average from my RRDtool from the
Linux command line interface.  I am able to print the number I want on a
graph, but I am not able to extract the number any other way.

Here is the command I am using to create the graph:

`rrdtool graph images/$graphname \
--imgformat=PNG \
--start=-$start \
--end=-$stop \
--title="$ip - Traffic +Out/-In" \
--base=1000 \
--height=300 \
--width=600 \
--vertical-label="Traffic Per Second in $graphby" \
DEF:b=/var/netflow/rrds/$rrdfile.rrd:$inds:AVERAGE \
DEF:a=/var/netflow/rrds/$rrdfile.rrd:$outds:AVERAGE \
CDEF:amod=a,$dsmod,* \
CDEF:bmod=b,$dsmod,* \
CDEF:cdefe=bmod,-1,* \
AREA:amod#ff0000:"Outbound ($graphby)" \
GPRINT:amod:LAST:"Current\:%8.2lf %s" \
GPRINT:amod:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:amod:MAX:"Maximum\:%8.2lf %s\\n" \
AREA:cdefe#880000:"Inbound ($graphby)" \
GPRINT:bmod:LAST:"Current\:%8.2lf %s" \
GPRINT:bmod:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:bmod:MAX:"Maximum\:%8.2lf %s\\n" \
LINE1:amod#A150AA: \
LINE1:cdefe#6557D0: \
CDEF:total=amod,bmod,+ \
CDEF:total2=total,8,/ \
CDEF:total3=total2,$time,* \
COMMENT:"In this time Period, you have used" \
GPRINT:total3:AVERAGE:"%8.2lf %s\\n"		\
CDEF:total4=total3,$ratio,* \
COMMENT:"At this rate, your monthly usage is" \
GPRINT:total4:AVERAGE:"%8.2lf %s"


The number I wish to extract is printed on this line:
GPRINT:total3:AVERAGE:"%8.2lf %s\\n"		\

How would I go about extracting that number without creating a graph?  I
have checkout out rrdtool xport and rrdtool fetch, but these do not seem
to help me.  ANY help is greatly appreciated.

Thank You,
Rick Blundell
http://netflowguide.com - Graphing Cisco netflow data with RRDtool


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