[rrd-users] Graph without values......newbie needs help please

Thorsten Volkmer-Wolf Thorsten.Volkmer-Wolf at aerotec.de
Fri Jan 16 15:52:03 MET 2004


( rrdtool 1.0.45 on DEBIAN Linux (Knoppix) 2.4.19 )

Hi Tobi, hi to the rest of this list.

First of all thanks to Tobi for providing rrdtool! I've just started fiddling around, followed the examples in the tutorial and was thinking i knew what's going on.....things are never as easy as they seem ;-)

So i started collecting temperature values with a script every two minutes and tried to graph them:

-----------Script : -------------------------------------------------

#!/bin/bash
PATH=/usr/bin:/bin
TFILE=/mnt/lxwndata/usvsvr_01/temperatures.dat
DBASE=/mnt/lxwndata/temps.rrd
PIC1=/mnt/lxwndata/tmpusv1.png

NOWTIME=`date +%s`
STARTDB=`expr ${NOWTIME} - 10`
STARTGRAPH=`expr ${NOWTIME} - 5400`

if ! test -r ${DBASE}
then
	rrdtool create ${DBASE} --start ${STARTDB} DS:temp:GAUGE:240:U:U \
		RRA:LAST:0.5:1:60 \
		RRA:AVERAGE:0.5:15:24
fi

# Getting the temperature value out of an ascii file:
MTMP=`tail -n1 ${TFILE} | awk 'BEGIN {FS=","}{print $9}' ${LINE}`

# and update rrd database:
rrdtool update ${DBASE} ${NOWTIME}:${MTMP}

# now create the graph
rrdtool graph ${PIC1} --start ${STARTGRAPH} --end ${NOWTIME} --vertical-label "Temperatur [°C]" \
	DEF:mytmp=${DBASE}:temp:LAST LINE2:mytmp:#FF0000:Uhrzeit --title "Temperatur USV svr_01" \
	> /dev/null

---------End of Script------------------------------------------------------


The script is running as CRON job every two minutes. And indeed it does create a png file with an y axis scale that fits the measured values, but there seems to be no line graphed, no values plotted. Even if i set the maximum of the y axis to a value higher than the measured maximum, no line appears.

After the script ran some 15 minutes i executed rrdfetch to see if there's something in the database:

#> NOWTIME=`date +%s`
#> STARTGRAPH=`expr ${NOWTIME} - 5400`
#> rrdtool fetch ${DBASE} LAST --start ${STARTGRAPH} --end NOWTIME}

1074261300: nan
1074261600: 2.4700000000e+01
1074261900: 2.4700000000e+01
1074262200: 2.4700000000e+01
1074262500: 2.4700000000e+01
1074262800: 2.4700000000e+01
1074263100: 2.4700000000e+01
1074263400: 2.4700000000e+01
1074263700: nan


#>

But still i get a nice png graph, showing the right times at x axis, the right temperature range at y axis, but no line seems to bee drawn from the values. 

I know i am missing something very important, but.....could you give me the right kick please?

Thanks in advance,

	Thorsten


++
Dipl.-Ing.
Thorsten Volkmer-Wolf
IT-Support & Services

AEROTEC Engineering GmbH
Hein-Saß-Weg 38
21129 Hamburg / Germany

fon +49 (0)40/742 198-241
fax +49 (0)40/742 198-111

<http://www.aerotec.de>

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