[rrd-users] Re: Whats wrong with my little script? Graphic stays emtpy

Serge Maandag serge.maandag at staff.zeelandnet.nl
Fri Aug 30 10:21:54 MEST 2002


Just took a quick glance, but shouldn't "value=`cat value.sh`" be
"value=`value.sh`"?

If the file ends with .sh, I'd say it's a script that prints a number,
not a file that holds a number.

serge.

-----Original Message-----
From: Mario Ohnewald [mailto:mario.ohnewald at gmx.de] 
Sent: Friday, August 30, 2002 10:02 AM
To: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] Whats wrong with my little script? Graphic stays
emtpy



Hello!
My Graphic keeps beeing empty. This is my script:

---------------------------

rrdtool create test.rrd --start 920804400 DS:speed:COUNTER:600:U:U
RRA:AVERAGE:0.5:1:24 RRA:AVERAGE:0.5:6:10

## Start Var
var=920804410

# Go, do loop.
while [ "lala" != "bubu" ]
        do
# get value from file. Vale starts at 100 and increases 1 every 5 sec.
value=`cat value.sh`

# Plus 5 secs
var=$[$var+5]

# Debug output
echo "var=" $var
echo "value=" $value

# update database
 rrdtool update test.rrd $var:$value
# rrdtool update test.rrd 920805600:123 920805900:12363 920806200:122 #
rrdtool update test.rrd 920806500:121 920806800:12393 920807100:123 #
rrdtool update test.rrd 920807400:124 920807700:12411 920808000:124


# do some magic ;)
## 920804500-920804400 = 100sec
## This should show my graphic in a 100sec window, cause the values get
updated every 5 secs. rrdtool graph speed.gif --start 920804400 --end
920804510 --vertical-label m/s \ DEF:myspeed=test.rrd:speed:AVERAGE
LINE2:myspeed#0000FF


sleep 5
done

---------------------------

Thanks a lot!

Mario Ohnewald

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

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