[rrd-users] Re: How to graph vertical line every 24 hours

Jean-Edouard BABIN listes at Jeb.com.fr
Fri Jun 29 19:07:28 MEST 2001


i have already ask for this, Alex van den Bogaerdt said:


   rrdtool .... --end 'jun 30 00:00' --start end-8d ....

so, you know you should loop through 8 days and, because 00:00 happens
to be a boundary, you'll have 9 occurances of midnight.
You can create a script that builds a RRDtool graph script.  In this
script you need 9 (or 7) VRULE commands.

In a pseudo language you'd do:

   $midnight=`date -d "jun 30 00:00" +%s`
   for (i=0;i<9;i++)
        print "VRULE:${midnight}#FF0000"
        midnight -= 86400

or

   $midnight=`date -d "jun 30 00:00" +%s`
   $midnight -= 86400
   for (i=0;i<7;i++)
        print "VRULE:${midnight}#FF0000"
        midnight -= 86400

This doesn't take daylight saving time into account so don't use
this example as a complete solution!


Another approach:

You can change the default behaviour for the grid.  Draw a major
grid line only at midnight and maybe change its color.

rrdtool graph ....
       --x-grid HOUR:8:DAY:1:DAY:1:86400:%a ....
       --color MGRID#FF0000
       ....


le 29/06/01 13:23, Pawel Dworniak (paul.dworniak at poczta.fm) ecrivait:

> 
> Hello everyone!
> 
> Can you tell me how can I graph vertical line every 24 hours?
> I know that I can use VRULE:time or use example from RRD documentation:
> 
> rrdtool graph example.png --title="INF demo"
> DEF:val1=some.rrd:ds0:AVERAGE
> DEF:val2=some.rrd:ds1:AVERAGE
> DEF:val3=some.rrd:ds2:AVERAGE
> DEF:val4=other.rrd:ds0:AVERAGE
> CDEF:background=val4,POP,TIME,7200,%,3600,LE,INF,UNKN,IF
> CDEF:wipeout=val1,val2,val3,val4,+,+,+,UN,INF,UNKN,IF
> AREA:background#F0F0F0
> AREA:val1#0000FF:Value1
> STACK:val2#00C000:Value2
> STACK:val3#FFFF00:Value3
> STACK:val4#FFC000:Value4
> AREA:wipeout#FF0000:Unknown
> 
> but it is hmmm... a bit complex
> 
> Thanks
> Paul
> Poland
> 


-- 
     Jean-Edouard BABIN

Web : http://www.Jeb.com.fr
Mail: Jeb at jeb.com.fr
ICQ : 27305084
IRC : @#Mac-Fr @#So etc.. undernet.org


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list