[rrd-users] Re: Grid Color 8 - 5

Alex van den Bogaerdt alex at ergens.op.HET.NET
Wed Jul 24 01:09:47 MEST 2002

Max Kipness II wrote:

> Can someone help me figure out the easiest way to color the grid on the
> graph another color (light yellow?) between the hours of 8am - 5pm?
> Would I use VRULE multiple times to create this? Is the time it's
> looking for epoch time?

Mix the following: AREA, INF, IF, UN, UNKN, LIMIT, LTIME
into a suitable CDEF.

When you draw the resulting cdef and then overlay it using your normal
lines/areas, it will look like it is a background.

Use LTIME to get local time.  Modulo 86400 to get wall clock time.
Process through LIMIT to set your limits.  The interval ending at
08:00 you want excluded, the interval ending at 17:00 you want to
include -->  LTIME,86400,%,8,3600,*,1,+,17,3600,*,LIMIT

Now you have something known when the time is right and something
unknown when it isn't.  Use this to select either INF or UNKN:

The result is either UNKNown when the time is NOT between 8am and 5pm
or INFinite when the time IS between 8am and 5pm.

Then use this to draw an AREA:       AREA:bgcolor#FFFF00

The CDEF would look like this (debug it):


Again: it might need debugging.

 / 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