[rrd-users] RRA
Simon Hobson
linux at thehobsons.co.uk
Thu Jul 7 15:14:44 CEST 2011
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
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the rrd-users
mailing list