[rrd-users] Re: Vertical Line
Alex van den Bogaerdt
alex at slot.hollandcasino.nl
Sun Jun 24 02:58:03 MEST 2001
Jean-Edouard BABIN wrote:
> >> Can draw vertical line every 0H ?
> >> i have not seen anything about this..
> >
> > There is no command that will repeat itself every midnight. However,
> > nothing stops you from using multiple VRULE commands.
> > You know what the start and end times are so you can figure out
> > how often 00:00 occurs on your graph.
>
> yes, but it's not very easy..
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
....
HTH
--
__________________________________________________________________
/ alex at slot.hollandcasino.nl alex at ergens.op.het.net \
| work private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. |
+----------------------------------------------------------------------+
| http://faq.mrtg.org/ |
| http://rrdtool.eu.org --> tutorial |
+----------------------------------------------------------------------+
--
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