[rrd-users] RRD1.1 and number of lines

Kees Hoekzema kees at tweakers.net
Sun Sep 15 20:35:19 MEST 2002


Hello list,

Is it possible to have a constant number of y-axis lines?
I have around 12 servers and want to monitor several aspects of it, and I
want those graphs to have the same look, kinda like the mrtg system.

I editted the source of rrdtool-2002-08-11 a bit to create a couple of
graphs, but there must be bugs in the code because sometimes the
upper-y-axis-line is gone. Is it possible to achieve the same effect with
the features now available? or do I have to bughunt and try to find out
where it goed wrong? :)

tia,
Kees Hoekzema

URLs:	http://stats.tweakers.net/stats/loads.php
	http://stats.tweakers.net/stats/loads.php?action=week
	http://stats.tweakers.net/stats/loads.php?action=maand
	http://stats.tweakers.net/stats/loads.php?action=jaar

My dirty patch of rrd_graph.c
src# diff rrdtool-2002-08-11/src/rrd_graph.c
rrdtool-modified/src/rrd_graph.c
1477c1477,1478
<
---
>     double   scaledstep;
>
1494a1496,1500
>             scaledstep = ceil((25 * im->maxval *
pow((double)10, -decimals)) - 0.0001) * pow((double)10,decimals - 2);
>             im->maxval = 4 * scaledstep;
>             range =  im->maxval - im->minval;
>             scaledrange = range / im->magfact;
>
1506,1507c1512,1515
<           /* should have at least 5 lines but no more then 15 */
<           if(range/im->ygrid_scale.gridstep < 5)
---
>           /* should have 5 lines */
>             im->ygrid_scale.gridstep = scaledstep;
>
> /*        if(range/im->ygrid_scale.gridstep < 5)
1510a1519
> */
1517,1518c1526,1527
<               im->ygrid_scale.gridstep /= 5;
<               im->ygrid_scale.labfact = 5;
---
>               im->ygrid_scale.gridstep /= 4;
>               im->ygrid_scale.labfact = 4;
1519a1529
>
1555c1565
<     int egrid = (int)( im->maxval / im->ygrid_scale.gridstep + 1);
---
>     int egrid = (int)( im->maxval / im->ygrid_scale.gridstep );

--
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