[rrd-users] newbie to rrdtool ...need help

Arnar Thorarinsson art at caa.is
Thu May 27 16:47:45 MEST 2004


Hello
I'm trying to understand this rrdtool and I'm having some trouble, and
yes I've read the documentation....
Lets say that I want to graph traffic through an airspace over some
time, broken down to total traffic, eastbound traffic and westbound
traffic.  I sample the data by hours.(data taken from a mysql database
FYI).  The idea is that I can create graphs of the traffic by week,month
and year, posible by days also.

Ok so I create a rrd :
/usr/bin/rrdtool create /tmp/traffic.rrd   \
  --start 1083369600                       \
  DS:Total:ABSOLUTE:3600:0:200             \
  DS:East:ABSOLUTE:3600:0:200              \
  DS:West:ABSOLUTE:3600:0:200              \
  RRA:AVERAGE:0.5:12:24                    \
  RRA:AVERAGE:0.5:288:31                   \
  RRA:MAX:0.5:12:24                        \

Enter some data:
/usr/bin/rrdtool update /tmp/traffic.rrd 1083373200:8:8:0
/usr/bin/rrdtool update /tmp/traffic.rrd 1083376800:4:3:1
/usr/bin/rrdtool update /tmp/traffic.rrd 1083380400:14:14:0
/usr/bin/rrdtool update /tmp/traffic.rrd 1083384000:3:3:0
/usr/bin/rrdtool update /tmp/traffic.rrd 1083387600:9:7:2
/usr/bin/rrdtool update /tmp/traffic.rrd 1083391200:12:12:0
/usr/bin/rrdtool update /tmp/traffic.rrd 1083394800:8:8:0
/usr/bin/rrdtool update /tmp/traffic.rrd 1083398400:19:15:4
/usr/bin/rrdtool update /tmp/traffic.rrd 1083402000:10:6:4
/usr/bin/rrdtool update /tmp/traffic.rrd 1083405600:8:2:6
/usr/bin/rrdtool update /tmp/traffic.rrd 1083409200:12:4:8
/usr/bin/rrdtool update /tmp/traffic.rrd 1083412800:8:2:6
/usr/bin/rrdtool update /tmp/traffic.rrd 1083416400:13:2:11
/usr/bin/rrdtool update /tmp/traffic.rrd 1083420000:15:1:14
/usr/bin/rrdtool update /tmp/traffic.rrd 1083423600:9:0:9
/usr/bin/rrdtool update /tmp/traffic.rrd 1083427200:15:8:7
/usr/bin/rrdtool update /tmp/traffic.rrd 1083430800:14:5:9
/usr/bin/rrdtool update /tmp/traffic.rrd 1083434400:3:0:3
/usr/bin/rrdtool update /tmp/traffic.rrd 1083438000:3:1:2
/usr/bin/rrdtool update /tmp/traffic.rrd 1083441600:4:3:1
/usr/bin/rrdtool update /tmp/traffic.rrd 1083445200:2:0:2
/usr/bin/rrdtool update /tmp/traffic.rrd 1083448800:0:0:0
/usr/bin/rrdtool update /tmp/traffic.rrd 1083452400:2:0:2
/usr/bin/rrdtool update /tmp/traffic.rrd 1083456000:2:2:0

and create the graph:
/usr/bin/rrdtool graph /tmp/traffic.gif          \
     --start 1083369600                          \
     --end 1083452400                            \
     --title="FDPS Traffic"                      \
     --vertical-label="Flights per hour"         \
     -h 400                                      \
     -w 800                                      \
     --step 3600                                 \
     --no-minor                                  \
     DEF:mytraffic1=traffic.rrd:Total:AVERAGE    \
     DEF:mytraffic2=traffic.rrd:East:AVERAGE     \
     DEF:mytraffic3=traffic.rrd:West:AVERAGE     \
     AREA:mytraffic1#708090:"Total"              \
     LINE3:mytraffic2#FF0000:"East"              \
     LINE3:mytraffic3#0000FF:"West" 



Ok this work fine but the problem is that the X-scale of off both its
value and the unit.

So the question is how can I control the scale and its unit ?

note: this included picture only has data for one day.




-- 
Kveðja
Arnar Þórarinsson

Tölvunarfræðingur
Kerfisdeild
Sími : 569 4289
----------------------
Flugmálastjórn Íslands
Reykjavíkurflugvöllur
121 Reykjavík
http://www.caa.is
----------------------

-- Attached file removed by Ecartis and put at URL below --
-- Type: image/gif
-- Size: 55k (57204 bytes)
-- URL : http://www.ee.ethz.ch/~slist/p/traffic.gif


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