[rrd-users] Re: Gap in right of graph

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Sat Jan 20 14:59:49 MET 2001


Aragon Gouveia wrote:

> The database gets updated every 2 minutes. At the same time, a new graph for
> each RRA gets drawn every 2 minutes. However, every graph without a step of
> 1 gets a gap between the beginning of the graph and the boundary of the
> graph canvis. It makes it appear as if there is no traffic in that gap area
> when there is. Am I doing something wrong? Is there anyway to get rid of
> those leading gaps? Sometimes the gaps are there, sometimes not. I've also
> seen some other sites using rrdtool to do graphing and they also have gaps
> in the same place on some of their graphs.

I assume you mean the right hand side of the graph.
If the last known value in your database is at, for instance, 14:54:00
and you create the graph at 14:55:30, there is no traffic *in the RRA*
for the interval 14:54:00 to 14:55:30.  This is the gap you're seeing.

The way to get rid of it?  Just graph until 14:54:00, not "now".
If your front end does something like
"rrdtool graph x.gif DEF:.... " etcetera, change it into:

TIMENOW=`date +%s`
TIMENOW=$((TIMENOW/120))
TIMENOW=$((TIMENOW*120))
rrdtool graph x.gif --e $TIMENOW DEF:.....

The 120 in these calculations is the same as the interval for the
smallest RRA.

cheers,
-- 
   __________________________________________________________________
 / 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