Hi, I'm trying to resize some rrd files to add more rows to the RRAs and I get the "ERROR: attempting to write beyond end of file" mentioned in the following thread ( https://lists.oetiker.ch/pipermail/rrd-users/2011-January/017476.html ).
The thread stopped at the message attached below. Did anybody find a solution or workaround? $ rrdtool create pippo.rrd DS:test:GAUGE:120:0:U RRA:AVERAGE:0.5:1:244 $ rrdtool resize pippo.rrd 0 GROW 10 ERROR: attempting to write beyond end of file Thank you, Daniel. -------------------------------------------------------------------------------- On Wed, Jan 19, 2011 at 09:12:19AM +0100, Tobias Oetiker wrote: > Hi Stefan, > > Today Stefan Brandl wrote: > > > > > Sorry Tobi, but my C-Programming knowledge is very limited, > > not to say non-existent :-( > > Could you tell me, where to put what code to further debug this? > > I would guess something like this could serve: > > Index: rrd_open.c > =================================================================== > --- rrd_open.c (revision 2172) > +++ rrd_open.c (working copy) > @@ -671,7 +671,7 @@ > > if((rrd_file->pos + count) > old_size) > { > - rrd_set_error("attempting to write beyond end of file"); > + rrd_set_error("attempting to write beyond end of file (%ld + > %ld > %ld)",rrd_file->pos, count, old_size); > return -1; > } > memcpy(rrd_simple_file->file_start + rrd_file->pos, buf, count); > Ok, thanks. This gives: noc at lowrider:~$ noc at lowrider:~$ /opt/rrdtool-1.4.5.002170/bin/rrdtool create tester.rrd DS:inet:GAUGE:600:0:U RRA:AVERAGE:0.5:1:600 noc at lowrider:~$ /opt/rrdtool-1.4.5.002170/bin/rrdtool resize tester.rrd 0 GROW 100 ERROR: attempting to write beyond end of file (6144 + 8 > 6148) noc at lowrider:~$ Stefan -------------------------------------------------------------------------------- _______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users