# here is how I created the graphs.. # the rrd database goes like this #-Create the database called oww.rrd #where # a=temperature is a guage update interval 600 seconds # b=wind speed is a guage # c=wind direction is a guage # d=barometer is a guage ( and not yet built let alone logging ) # ------------------The rrd database ---------------------------------- rrdtool create oww.rrd --start 978300900 \ DS:a:GAUGE:600:U:U \ DS:b:GAUGE:600:U:U \ DS:c:GAUGE:600:U:U \ DS:d:GAUGE:600:U:U \ RRA:MIN:0.5:1:600 \ RRA:MIN:0.5:6:700 \ RRA:MIN:0.5:24:775 \ RRA:MIN:0.5:288:797 \ RRA:AVERAGE:0.5:1:600 \ RRA:AVERAGE:0.5:6:700 \ RRA:AVERAGE:0.5:24:775 \ RRA:AVERAGE:0.5:288:797 \ RRA:MAX:0.5:1:600 \ RRA:MAX:0.5:6:700 \ RRA:MAX:0.5:24:775 \ RRA:MAX:0.5:288:797 # I still don't confess to understanding fully yet # but it has been logging for a few days now and seems to be OK # ----------------------------End of my rrd database --------------------- # I call the following script from my crontab every minute # ---------------Start of makegraph script ------------------------------- tail -1 logfile.log > /home/rob/public_html/logfile # this just copies the last ( most recent ) line of the OWW log # to a convenient place to be used later on # now to the first 4 graphs - 24 Hrs for temp wind speed and dir and the # as yet ficticious barometer rrdtool graph public_html/temp5min.gif --start -90000 \ --vertical-label Degrees_C \ DEF:linea=oww.rrd:a:AVERAGE LINE2:linea#FF0000:"TEMPERATURE" \ HRULE:0#00AA00:'Freezing Point (0C)' rrdtool graph public_html/speed5min.gif --start -90000 \ --vertical-label MPH \ DEF:lineb=oww.rrd:b:AVERAGE \ LINE2:lineb#00FF00:"WIND SPEED" rrdtool graph public_html/dir5min.gif --start -90000 \ --alt-autoscale-max -u 360 -r -v "N E S W N" \ DEF:linec=oww.rrd:c:AVERAGE LINE2:linec#0000FF:"WIND DIRECTION" # 7 day graphs all round rrdtool graph public_html/weeklytemp.gif -s -604800 \ DEF:linea=oww.rrd:a:AVERAGE LINE3:linea#FF0000:"This Week TEMPERATURE" \ rrdtool graph public_html/weeklywind.gif --start -604800 \ --vertical-label MPH \ DEF:lineb=oww.rrd:b:AVERAGE \ LINE3:lineb#00FF00:"This Week WIND SPEED" rrdtool graph public_html/weeklydir.gif --start -604800 \ --alt-autoscale-max -u 360 -r -v "N E S W N" \ DEF:linec=oww.rrd:c:AVERAGE LINE3:linec#0000FF:"This Weeks WIND DIRECTION" # this months graph for all data rrdtool graph public_html/monthlytemp.gif --start -3170880 \ DEF:linea=oww.rrd:a:AVERAGE LINE3:linea#FF0000:"This Months TEMPERATURE" \ rrdtool graph public_html/monthlywind.gif --start -3170880 \ --vertical-label MPH \ DEF:lineb=oww.rrd:b:AVERAGE \ LINE3:lineb#00FF00:"This Months WIND SPEED" rrdtool graph public_html/monthlydir.gif --start -3170880 \ --alt-autoscale-max -u 360 -r -v "N E S W N" \ DEF:linec=oww.rrd:c:AVERAGE LINE3:linec#0000FF:"This Months WIND DIRECTION" cat refresh > /home/rob/public_html/index.html cat /home/rob/public_html/logfile >> /home/rob/public_html/index.html cat /home/rob/public_html/weather.php >> /home/rob/public_html/index.html # -------------------this is the end of the makegraph executable--------- # The above 3 lines add a refresh tag to the head of the index page # ( refreshes every minute ) # then inserts the last line of data from OWW into the top of the web page # adds the following graphing page into the index page #--------------------- Start Of Webpage ( weather.php )------------------

Todays Graphs

Weekly Graph

This Month

# ----------------------------------------End of Webpage ----------------------- # here for your delight is my .oww_setupNG # I guess the only bit here that is relevent is the postlog bit # under the command String section # Miscellaneous debugfile debuglevel 0 interval 10 updatevar OWWUPDATE popup 1 raindaily 0 arneudpport 8890 arnetcpport 8888 owwtcpport 8899 # Format strings displaydate %d/%m/%y %H:%M:%S logfilef /%y%m/%y%m%d.log logdirf /%y%m logform $localtime%d/%m/%y , %H:%M:%S$ , $t1%7.1$,$tunit$ , $wsp%7.2$,$wspunit%5$,$wdrdeg%5.1$,$wdrname%10$ logheadf Date Time Temperature Speed Direction raintform Rain: %%s since %H:%M raindform Rain: %%s since %d/%m/%y # Data source datasource 1 owwremote_host localhost owwremote_port 8899 arneremote_host localhost arneremote_port 8888 # Command strings postupdate postlog /usr/bin/rrdtool update oww.rrd $unixtime$:$tc1$:$wspmph$:$wdrdeg$:$unixtime$ httpprecom httppostcom # HTTP setup httpuseproxy 0 httpproxy httpdallas http://198.3.123.122:8080/servlet/WeatherServlet httpdallason 0 httpwund http://www.wunderground.com/weatherstation/updateweatherstation.php httpwunduser NO_USER httpwundpass httpwundon 0 httpham http://www.hamweather.net/weatherstations/vwsupdate.php httphamuser NO_USER httphampass httphamon 0 httptime 10 httptsnap 0 longitude 0.000000 latitude 0.000000 # Display setup tmin 300.000000 tmax -300.000000 mph 1 fahr 0 mm 0 anim 1 reporttrh 0 # Log setup loginterval 10 logtype 1 logfile_name /home/rob/logfile.log logdir_name logdir logvar OWWLOGGED font # ------------------- End of .oww_setup--------------------------------- A big thanks to all involved in getting me this far... Love , Peace and Linux Rob robocog@hotmail.com www.robocog.dyndns.org Credits ------- Dr S.Melhuish for Oww http://melhuish.info/simon/projects/oww/index.html Tobi Oetiker for RRDtool http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ And to all on the Dallas Semicondutor Weather List http://lists.dalsemi.com/mailman/listinfo/weather EOF