[rrd-users] Question about RRDTool ..
Simon Hobson
linux at thehobsons.co.uk
Thu Mar 20 15:00:16 CET 2008
Jean-Yves Avenard wrote:
> >Lastly, it's a good idea to explicitly round your graph end time to
>>be exactly on the end of a step boundary, and your start time to be
>>exactly an integer number of steps before the end.
>
>Is there a way to display the graph using the rounded end-time to a
>multiple of the period (timestamp that will be in GMT), but to display
>the legend in local time instead?
GNU date :
%s seconds since 1970-01-01 00:00:00 UTC
so in bash :
Step=300
Pixels=400
End=`date +%s`
End=$(( ${End} / ${Step} * ${Step} ))
Start=$$( ${End} - ( ${Step} * ${Pixels} ) ))
then you can do :
rrdtool graph ... -s ${Start} -e ${End} -w ${Pixels} ...
I believe the legend will use the local timezone if configured. Try a
search of the archives, it's been mentioned not too long ago IIRC.
More information about the rrd-users
mailing list