Hello, thank you for your answer, but i think your idea is the same as making all in the loop to build it in one go the problem is: when i made rrdtool info rrd_file.rrd ,only one RRA is created and took the last value of pdp and nb: it's mean pdp3 and nb3
2011/7/7 Simon Hobson <li...@thehobsons.co.uk> > fadwa salam wrote: > > >I want to do a loop to create RAR archives by varying each time > >pdp_per_row and number of records that will be given as arguments. > > > > rrdtool create $ rrd \ > > - start $ now \ > > - step = $ step \ > > DS: Power: GAUGE: 600: U: U > > RRA: AVERAGE: 0.5: $ pdp $ nb > > > >The problem is that I can not handle RAR alone. They are linked to > >the process of the creation. > > > >if I put the whole process of creation inside the loop ,it create a > >single RAR archive and take the last value. > > If I understand this correctly, you want build up an RRA piecemeal - > create the basic file and then add RRAs to it one by one. > > This is not supported by RRD, you are expected to build it in one go > - like this : > > rrdtool create $ rrd \ > - start $ now \ > - step = $ step \ > DS: Power: GAUGE: 600: U: U > RRA: AVERAGE: 0.5: $pdp1 $nb1 > RRA: AVERAGE: 0.5: $pdp2 $nb2 > RRA: AVERAGE: 0.5: $pdp3 $nb3 > > Whilst there are tools for adjusting RRD files, I don't think it > would be easy (or even possible ?) to do what you want with them. > > Possibly your best approach would be to make a "wrapper script" to > consolidate the steps and then make one call to create the RRD file. > Something along these lines : > > cmd_text="- start $ now \ > - step = $ step \ > DS: Power: GAUGE: 600: U: U \ > " > > while <some condition> do > <get consolidation> > cmd_text=`echo "${cmd_text} RRA:${cf_func}:${hb}:${pdp}:{nb} \ > "` > done > rrdtool create $ rrd ${cmd_text} > > -- > Simon Hobson >
_______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users