[rrd-users] GPRINT printing the time that Max occured in the legend

Robert Conway rjconway at bigpond.com
Mon Jan 31 11:40:21 CET 2011


Hi List,  Been using rrdtools for a few years however only ever had basic
graph options.  Looking to expand my knowledge



1.       Print time of Max Value in legend

I know this should be easy (I think) however cannot seem to get the time
that the MAX value was recorded in the legend.  I thought all I would have
to do is add :srtftime %H %m %S.


VDEF:phavg=phv,MAXIMUM GPRINT:phavg:"  Peak = %3.0lf mbar " :srtftime "%H %m
%S" \



RRD Version 1.4.3


THIS IS MY CURRENT CODE (Without time of max value)


## Weather Station Barometer ##

rrdtool graph /var/www/weather.png --start $STIME --end $ETIME \

--upper-limit $HIGHSCALE --lower-limit $LOWSCALE \

--alt-y-grid \

--rigid \

--units-exponent 0 \

--interlaced \

--width 944 --height $HEIGHT \

--vertical-label "millibar" \

--color CANVAS#000000 \

--title "Barometric Pressure" \

LINE1:phv#0000FF:"Pressure" \

VDEF:phlast=phv,LAST GPRINT:phlast:"Current = %3.0lf"  \

VDEF:phavg=phv,MAXIMUM GPRINT:phavg:"  Peak = %3.0lf mbar \l" \

--watermark "Weather Station">/dev/null



2.       I see GPRINT has been obsoleted

I understand GPRINT is no longer the preferred way however there are little
examples of using whatever has taken over from GPRINT.  I did try simply
changing GPRINT to PRINT however it did not work.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20110131/3f446ef2/attachment-0001.htm 

More information about the rrd-users mailing list