[rrd-users] Re: Help! Resize difficulties.

JTuite at PanAmSat.com JTuite at PanAmSat.com
Fri Dec 8 17:52:54 MET 2000


I resize RRA 0 of several RRDs every 5 minutes.
I run this script with cron. It resizes every rrd in a directory.
To take care of several directories with one cron job, I actually run a
script that calls this script several times but the directory is different
each time.

This script resizes, then deletes the original, then copies the resize.rrd
to the originals name. It also lists the sizes before and after.

the command line is: 
resize-rrd ./cricket-data/path-to-rrd-files 0 GROW 1
the params are Directory, RRA, GROW/SHRINK, Records

here's the script:
#!/bin/bash
	for rrdfile in $1/*.rrd ; do
		echo Before
    		ls $rrdfile -s
		rrdtool resize $rrdfile $2 $3 $4
		rm $rrdfile
		cp resize.rrd $rrdfile
		rm resize.rrd
		echo After
    		ls $rrdfile -s
		echo 
	done

-----Original Message-----
From: Sean R McNamara [mailto:sean.r.mcnamara at villanova.edu]
Sent: Thursday, December 07, 2000 15:57
To: mlf2 at tampabay.rr.com
Cc: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] Re: Help! Resize difficulties.



Mike Fisher wrote:

>
> I ran into this earlier in the week.  The resize does not modify the
> existing RRD file, it creates a new one in the current directory called
> resize.rrd with the new size and the old data.  Just move this over your
> old on and you should be ok.  This should probably be dealt with in the
> manual.
>
> Mike

Thank you Mike, that was the problem; and it seems to be working at this
point. Now it's just a matter of waiting while my script updates all of the
rrds.

I'm not sure if you'd happen to know -- but, is there a convenient way to
merge a backup of the the overwritten data with the current database?
There is no overlapping between the two, and unfortunately there is a
missing gap of about 2 weeks, but there's nothing to be done about that now.

Thanks again Mike,

..Sean.



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

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