[rrd-users] help please: graphing traffic totals
Abraham van der Merwe
abz at frogfoot.net
Sat Jun 19 18:26:24 MEST 2004
Hi!
I would like to graph traffic totals over time, e.g.
time value (byte/s)
1 10
2 30
3 20
4 25
Now on the graph it should be
time value (bytes)
1 10
2 40
3 60
4 85
(actually it is a little bit more complicated because the samples are
obviously X minute averages, so it would have to by (x+prev_x)*60*y where Y
is the interval
The only way I could think of to do this is to use the PREV cdef function,
e.g.
------------< snip <------< snip <------< snip <------------
/usr/bin/rrdtool graph aki.png \
--imgformat=PNG \
--start=end-86400 \
--end=1087658594 \
COMMENT:"From 2004-06-18 17:23:14 to 2004-06-19 17:23:14\c" \
COMMENT:"Graph Generated at 2004-06-19 17:23:14\c" \
--title="aki - Traffic - FastEthernet0/0 - Facing towards mojo" \
--rigid \
--base=1000 \
--height=180 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--base 1024 \
--vertical-label="bytes per second" \
DEF:a="aki_traffic_in_152.rrd":traffic_in:AVERAGE \
DEF:b="aki_traffic_in_152.rrd":traffic_out:AVERAGE \
CDEF:total=a,b,+ \
CDEF:sum="total,PREV(sum),+" \
LINE1:total#CC0000:"Total" \
LINE2:sum#0000AA:"Previous"
------------< snip <------< snip <------< snip <------------
Iow, I have a database with traffic_in, traffic_out. Samples gathered every
5-minute interval.
Now, I sum in/out and then have the recursive CDEF function:
sum=total,PREV(sum),+
However, if I run this, rrdgraph segfaults:
------------< snip <------< snip <------< snip <------------
root at oasis:/tmp/graph# ./gen.sh
./gen.sh: line 23: 4410 Segmentation fault /usr/bin/rrdtool graph
aki.png --imgformat=PNG --start=end-86400 --end=1087658594 COMMENT:"From
2004-06-18 17:23:14 to 2004-06-19 17:23:14\c" COMMENT:"Graph Generated at
2004-06-19 17:23:14\c" --title="aki - Traffic - FastEthernet0/0 - Facing
towards mojo" --rigid --base=1000 --height=180 --width=500
--alt-autoscale-max --lower-limit=0 --base 1024 --vertical-label="bytes per
second" DEF:a="aki_traffic_in_152.rrd":traffic_in:AVERAGE
DEF:b="aki_traffic_in_152.rrd":traffic_out:AVERAGE CDEF:total=a,b,+
CDEF:sum="total,PREV(sum),+" LINE1:total#CC0000:"Total"
LINE2:sum#0000AA:"Previous"
root at oasis:/tmp/graph#
------------< snip <------< snip <------< snip <------------
Is there any other way to do this?
--
Regards
Abraham
TODAY the Pond!
TOMORROW the World!
-- Frogs (1972)
___________________________________________________
Abraham vd Merwe - Frogfoot Networks CC
1st Floor, Albion Springs, 183 Main Road, Newlands
Phone: +27 21 689 3876 Cell: +27 82 565 4451
Http: http://www.frogfoot.net/ Email: abz at frogfoot.net
--
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