[rrd-users] Re: segmentation fault with graph command

Alex van den Bogaerdt alex at ergens.op.het.net
Wed Sep 14 05:34:12 MEST 2005


On Tue, Sep 13, 2005 at 07:58:27PM -0700, kericson at sdsc.edu wrote:
> Hi again,
> 
> Alex, thanks very much for replying so quickly!  I didn't need to store
> data for that long, that's unfortunately the way I set it up.  Now I guess
> I've got to extract the data from the .rrd files and start over?

You can probably salvage the existing data.  I never tried this but
I see no reason why it wouldn't work:

Optional:
(you probably don't need to do this.  People updating every 5 mins do)

temporarily alter your updating procedure so that you log it
to a file in stead of altering your database.  Be sure to store both
time and value in this file.  Stop updating your database.

Then:

Dump the database again.

Edit the xml file; remove any line below <database> you don't want.
I suggest deleting about 50,000 lines.  Say you want to store your
data for three years, you want to keep timestamp 2002-09-14 and
further.

Restore the database.

Optional: if you rerouted your updates as described above, insert
them now (in chronological order) and undo the changes you made to
the updating process.




Why should this work?  The xml file does not contain the amount of
rows.  This is computed from the actual number of rows present. Thus,
if you alter the xml file you will end up with a database containing
the new number of rows after restore.


However, having seen your database, it is probably more conveniant
to just create a new database, start time 1123545600, and fill it
with existing data:

rrdtool update name_of_database.rrd \
     1123718400:0 \
     1123891200:0 \
     1124064000:0 \
     1124236800:0 \
     1124409600:0 \
     1124582400:0 \
     1124755200:0 \
     1124928000:0 \
     1125100800:U \
     1125273600:U \
     1125446400:U \
     1125619200:0 \
     1125792000:0 \
     1125964800:0 \
     1126137600:0 \
     1126310400:0 \
     1126483200:0

cheers,
Alex

--
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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list