#!/bin/sh rrdtool graph "$graph.tmp" \ \ --imgformat PNG \ \ --width "$width" \ --height "$height" \ \ --start end-1d \ --end now \ \ --title 'one day' \ --vertical-label c \ \ --units-exponent 0 \ --units-length "$units_length" \ \ --slope-mode \ --interlaced \ --alt-y-grid \ \ "DEF:temp=$rrd:temp:AVERAGE" \ "DEF:temp_cf_min=$rrd:temp:MIN" \ "DEF:temp_cf_max=$rrd:temp:MAX" \ \ 'VDEF:temp_min=temp_cf_min,MINIMUM' \ 'VDEF:temp_max=temp_cf_max,MAXIMUM' \ 'VDEF:temp_avg=temp,AVERAGE' \ 'VDEF:temp_last=temp,LAST' \ \ 'COMMENT:\s' \ 'COMMENT:\s' \ 'COMMENT:\s' \ 'COMMENT: min max avg last\n' \ 'COMMENT:\s' \ \ "LINE2:temp#$today:today " \ 'GPRINT:temp_min:%6.1lf' \ 'GPRINT:temp_max:%6.1lf' \ 'GPRINT:temp_avg:%6.1lf' \ 'GPRINT:temp_last:%6.1lf\n' \ \ "COMMENT: `date '+%Y-%m-%d %H\:%M\:%S %z'`" \ \ > /dev/null 2>&1 if [ -f "$graph.tmp" ] then mv "$graph.tmp" "$graph" fi