[rrd-users] Only NaN values

Eric Knauel eric at macnews.de
Sun Sep 17 23:36:40 MEST 2000


Hi,

I'm new to rrd and working on a little script which should create nice 
statics from ipchains ip accounting feature (Linux 2.2.x). Somehow rrd
doesn't seem to like what I want it to do, it seems only to store NaN
values. Here is what I did:

# create database(s)
NOW=`perl -e "print time;"` 
UPDATE=120
echo $NOW > db_created.txt

# tcp_in and tcp_out
rrdtool create tcp.rrd \
        --start $NOW  \
        DS:tcp_in:GAUGE:$UPDATE:U:U    \
        DS:tcp_out:GAUGE:$UPDATE:U:U   \
        RRA:AVERAGE:0.5:1:24           \
        RRA:AVERAGE:0.5:6:10 

I think, I can use GAUGE, since I'm resetting the value of the counter
each time I read it. It's the same effect with COUNTER.

For updating I call rrdtool this way:

TMP="tmpdata.txt"
PREP="./ipchains-update.pl"

ipchains -L tcp_in   -v -x | $PREP >  $TMP
ipchains -L tcp_out  -v -x | $PREP >> $TMP
rrdtool update tcp.rrd -t tcp_in:tcp_out "N`cat $TMP`"

The ipchains-update.pl script parses the output of ipchains correctly
and so the content of tmpdata is something like ":3737:0". This
results in the expanded call:

rrdtool update tcp.rrd -t tcp_in:tcp_out N:3737:0

rrd doesn't complain about this call, but when I use rrdtool fetch or
dump all values I are NaN. What did I do wrong?

Ciao,
    Eric
-- 
Please don't drink the Emperor!

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