rrd - What's the command line for rrdtool to create a graph using the last update time as the end time? -


going off of question: print time of recording last value

it appears possible have rrdtool compute timestamp of last update in rrd. how use in command "end" time?

i.e. want this:

rrdtool graph img.png -a png -s e-600 -e lastupdatetime -v "cpu usage" \   --title "cpu utilization" def:ds0a=node.rrd:ds0:average \     def:ds1a=node.rrd:ds1:average area:ds0a#35b73d:"user" \   line1:ds1a#0400ff:"system" 

i tried mucking def, cdef , vdef things no avail:

rrdtool graph img.png -a png -v "cpu usage" --title "cpu utilization" \   def:data=node.rrd:x:average cdef:count=data,un,unkn,count,if  \   vdef:last=count,maximum \   def:ds0a=node.rrd:ds0:average:start=end-600:end=last \   def:ds1a=node.rrd:ds1:average:start=end-600:end=last \   area:ds0a#35b73d:"user" line1:ds1a#0400ff:"system"  

this results in:

error: end time: unparsable time: last 

any ideas?

on command line, do

rrdtool graph img.png -a png -s e-600 -e `date +%s node.rrd` -v "cpu usage" \   --title "cpu utilization" def:ds0a=node.rrd:ds0:average \     def:ds1a=node.rrd:ds1:average area:ds0a#35b73d:user \   line1:ds1a#0400ff:system 

Comments