[rrd-users] this script produces NaN for data

Hunter Peress hunterp at fastmail.fm
Thu Nov 13 21:25:12 MET 2003


Run the below script first with an arg, thena  few times without an arg.
then run rrdtool dump test.rrd and you'll see that the data is NaN.

why ?



#!/bin/bash

## execute this file with 
## 1 argument to create test.rrd
## 0 arguments to update test.rrd, create a graph, and copy it as
speed.png to ~/public_html

if [ $1 ] ; then
    echo "creating"
    rrdtool create test.rrd             \
            DS:ds1:GAUGE:600:U:U  \
            DS:ds2:GAUGE:600:U:U \
            RRA:AVERAGE:0.5:1:2

    rrdtool update test.rrd N:15341273:14508064

else 
    echo "updating"
    rrdtool update test.rrd N:25341273:24508064

    rrdtool graph speed.png                              \
          --height 800 --width 600              \
            DEF:dds1=test.rrd:ds1:AVERAGE \
            DEF:dds2=test.rrd:ds2:AVERAGE \
            LINE1:dds1#1e4477:"ds1"\
            LINE1:dds2#2f4477:"ds2"
     
    cp speed.png ~/public_html/
fi

-- 
  Hunter Peress
  hunterp at fastmail.fm
-- 
  Hunter Peress
  hunterp at fastmail.fm

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