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

A Darren Dunham ddunham at taos.com
Mon Jan 31 23:04:58 CET 2011


On Mon, Jan 31, 2011 at 09:40:21PM +1100, Robert Conway wrote:
> 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.

But instaead what you are getting is...??

Main thing that might trip you is that :strftime doesn't just add the
timestamp to the value it replaces it.  So as far as I know, you can't
print both the value and the timestmamp.

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

(also, "sTRftime", not "sRTftime")

So instead of that, you'd need:

GPRINT:phavg:"  Peak Value= %3.0lf mbar " \
GPRINT:phavg:"  Peak Time = %H %m " :strftime

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

I think you're seeing a bit in the documentation that a particular form
of GPRINT (one with an integrated CF function) has been deprecated.  The
form you are using above is not.

-- 
Darren



More information about the rrd-users mailing list