[rrd-users] Re: Only NaN values

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Mon Sep 18 00:10:28 MEST 2000


Eric Knauel wrote:
> 
> # 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.

Not that it should cause this problem but no, it is not the same.
If you use GAUGE, rrdtool won't divide by the time lapsed.
Use ABSOLUTE instead.

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

Carefully view your temp file.  Perhaps there are some weird characters
in it that aren't producing an error but are also not numbers.  No numbers,
not a number.  Use "<tmpdata.txt od -t x1".

> 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

Save a few of these calls.  Also record the time.  You could, for instance,
write them to a log file.  This will aid in debugging your scripts.
Make sure to duplicate exactly what you're doing.  Best is to duplicate
the last line, prepend it with "echo" and append " >> mylogfile".

If above suggestions don't help, create a shell script that emulates
the complete process (generating the RRD, updating it) using the values
you kept.  Keep it small so you can post it to the list if necessary.

regards,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

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