[rrd-users] Re: how would you help me?

Jay Guerette JayGuerette at pobox.com
Mon Jan 14 02:40:37 MET 2002

> i am new user for rrd tool, i have been using mrtg for last three
> months now i want to play with rrd tool, can any one help me in easir
> way how do i set it up for my routers and switches,
> i would be very thank ful to you

Here is a good place to start:

That tutorial speaks specifically about duplicating the functionality of
Create mtrg-like RRD databases with this command:

rrdtool create myrouter.rrd         \
DS:input:COUNTER:600:U:U   \
  DS:output:COUNTER:600:U:U  \
  RRA:AVERAGE:0.5:1:600      \
  RRA:AVERAGE:0.5:6:700      \
  RRA:AVERAGE:0.5:24:775     \
  RRA:AVERAGE:0.5:288:797    \
  RRA:MAX:0.5:1:600          \
  RRA:MAX:0.5:6:700          \
  RRA:MAX:0.5:24:775         \

And create mrtg-like graphs with this command:

rrdtool graph myrouter-day.gif --start -86400 \
  DEF:inoctets=myrouter.rrd:input:AVERAGE \
  DEF:outoctets=myrouter.rrd:output:AVERAGE \
  AREA:inoctets#00FF00:"In traffic" \
  LINE1:outoctets#0000FF:"Out traffic"

You will have to change the '--start -86400' to get weekly -604800, monthly -
2419200, and yearly -29030400 graphs.
You have to figure out the best way to get the data into the database. I
personally use the following script on a Linux server:
(note: it assumes that you already set up the databases with the same names
as the servers you're getting the data from.)

#! /bin/bash

cd /home/httpd/html/rrd/
export PATH=$PATH:/usr/local/rrdtool/bin:/usr/local/bin/

if [ $# == 0 ]; then
  for SERVER in `cat /etc/rrd_update.lst`; do
    export SERVER
    ARGS=`echo $SERVER | { read NAME COMMUNITY IFACE; echo
    IFS=' '
    rrd_update.sh $ARGS

IFS=' '
DATA=`snmpget -Onv $1 $2 interfaces.ifTable.ifEntry.ifInOctets.$3
interfaces.ifTable.ifEntry.ifOutOctets.$3 | \
while read NAME BITS; do
echo $DATA

rrdtool update $1.rrd $DATA

Which uses a list of routers/servers in a separate file that looks like this:


The format is:
server name in dns, snmp community string, interface number

I schedule rrd_update.sh in cron to run every 5 minutes, and it finds my
list ofservers, gets snmp data from each, and updates their databases.

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