Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to make an average of 5 samples and calculate a single value:

Current output - I put resolution of 5 minutes but receive 5 samples:

$ rrdtool fetch file.rrd  AVERAGE -r 300 --start 1200000000 --end 1200000300
1200000000: 1.3938888889e+00
1200000060: 4.9572222222e+00
1200000120: 7.1675000000e+00
1200000180: 1.0982500000e+01
1200000240: 7.6136111111e+00
1200000300: 7.2169444444e+00

Desired result:

$ rrdtool fetch file.rrd  AVERAGE -r 300 --start 1200000000 --end 1200000300
1200000000: 1.3938888889e+00
1200000300: x.xxxxxxxxxxe+00 - average

I want calculate it with rrdtool or other language like perl, bash, etc...

share|improve this question
post a small amount of the source data – igelkott Feb 21 at 20:25

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.