[rrd-users] log graph problems

Bernard Quatermass bernard at quatermass.co.uk
Mon Feb 7 15:58:23 CET 2011


Just hit this one.

There is no special rrdtool create/graph that triggers this because it's not rrdfile specific issue.

Basically im->magfact is not set if you select --logarithmic

The only code that sets  im->magfact is si_unit()

si_unit() is not called if --logarithmic

so the value in the structure is indeterminate for log graphs.

then in calc_horizontal_grid()   scaledrange is calculated based on the the range and the im->magfact

so if im->magfact is NaN  or some other value (0?) that makes scaledrange NaN then the isnan test
immediately following will fail and no graph is produced.

a quick hack in auto_scale() seems to ensure that graphs are produced. 

   im->magfact = (*magfact);

Whilst the graphs don't look too ridiculous I've not had a chance to do any verification. I'm also not sure
this solution is strictly correct given the multiple calls to auto_scale() for the second Y annotations.

-- 
Bernard Quatermass.


More information about the rrd-users mailing list