[rrd-users] Forcasting and 85 and 90% crossing

Big B cb1300nz at gmail.com
Sun Feb 15 23:08:18 CET 2009


Good day All

 

I'm doing a forecasting graph on disk usage. I would like to print the date
that the usage would cross the 80% and the 95% threshold in a comment
section at the bottom of the graph.

 

Could anybody give advice or point me in the right direction on how to use a
VDEF/CDEF or RPN to do this.

 

Thanx

Brian

 

Code snippet - quick and dirty

###############################################

rrdtool graph /nfs/graphs/cpu/$fn.png \

                --width 720 --height 250 \

                --start now-8w \

                --end now+1m  \

                --font TITLE:12:Times \

                --title "$fn1 - Utilization and Forecasting" \

                --vertical-label "Percent" \

                --x-grid DAY:1:DAY:7:DAY:14:86400:%d/%b \

                 --upper-limit 100 --lower-limit 0 -r \

                COMMENT:"Forcast From $str1 to $str2 \c" \

                DEF:mx1=$a:cpu:AVERAGE:start=now-8w:end=now \

                DEF:data2=$a:cpu:AVERAGE:start=now-8w:end=now+1m \

                DEF:usd2=$a:cpu:AVERAGE:start=now-4w:end=now+2w \

                DEF:usd3=$a:cpu:AVERAGE:start=now-6w:end=now+3w \

                DEF:data3=$a:cpu:AVERAGE \

                VDEF:D=data2,LSLSLOPE \

                VDEF:H=data2,LSLINT \

                VDEF:D2=usd2,LSLSLOPE \

                VDEF:H2=usd2,LSLINT \

                VDEF:D3=usd3,LSLSLOPE \

                VDEF:H3=usd3,LSLINT \

                CDEF:projection=data2,POP,D,COUNT,*,H,+ \

                CDEF:projection2=usd2,POP,D2,COUNT,*,H2,+ \

                CDEF:projection3=usd3,POP,D3,COUNT,*,H3,+ \

                COMMENT:"Projection \n" \

 
COMMENT:"-------------------------------------------------------------------
------------- \n" \

                LINE1:projection#FF0000:"1 Month Forcast From $str1 to
$str2" \

                GPRINT:projection:LAST:"Final Value of \:%3.2lf %s \n" \

                LINE2:projection3#00BD27:"3 Weeks Forcast From $str3 to
$str4" \

                GPRINT:projection3:LAST:"Final Value of \:%3.2lf %s \n" \

                LINE3:projection2#00FF00:"2 Weeks Forcast From $str5 to
$str6" \

                GPRINT:projection2:LAST:"Final Value of \:%3.2lf %s \n" \

 
COMMENT:"-------------------------------------------------------------------
------------- \n" \

                AREA:data3#FF7D00:"Average" 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20090216/0c79475a/attachment.html 


More information about the rrd-users mailing list