It's even quite easy.

If you want to have the average value printed below your graph, do it
like this:

DEF:avg_in=/path/database.rrd:ds0:AVERAGE
GPRINT:avg_in:AVERAGE:%6.2lf %sBps

If you want to get the number to process it, then replace the GPRINT
with PRINT. rrdtool will print it to std-out along with the size of your
graph.

I capture the PRINT outputs in a perl script like this: 
my ($Outputret,$xsize,$ysize) = RRDs::graph $destination, @rrdoptions;

Ofcourse, you can also use 'rrdtool fetch' and calculate the average
yourself.

serge.



-----Original Message-----
From: Buttery, Daniel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 18, 2003 9:59 AM
To: '[email protected]'
Subject: [rrd-users] Getting a different 'average'


Hi peeps.
 
We've got RRDTool grabbing SNMP data from our Netscreen appliance to
plot
bandwidth utilisation for the Internet, and everything is working fine.
 
Is there anyway I can print a value that will give me the average
bandwidth
used? ie....
 
I've written a Perl script that creates a graph from the database for a
defined number of days. Using the information gathered, I'd like to know
on
average how much bandwidth we use during the day (say, between 8am and
6pm)
for reporting purposes.
 
Relatively straightforward requirement I guess, but I haven't found a
way to
do it after going through the documentation. If it isn't possible, can I
get
my Perl script to read the values being used to generate the graph, tot
them
up and use that in a sum to do a 'brute force' calculation (ie do the
sum
and pipe the answer to a text file or similar)? I hope that makes sense.
 
Thanks in advance!

Daniel Buttery
IT Services Engineer
Music Choice Ltd, Fleet House
57-61 Clerkenwell Road, London, EC1M 5LA
Direct Line +44 (0)20 7014 8703
Mobile +44 (0)7901 916 614
Main Tel +44 (0)20 7014 8700
Main Fax +44 (0)20 7253 8460
Email [EMAIL PROTECTED] 

 


http://www.musicchoice.co.uk

Support Digital Media - Join EDiMA - http://www.edima.org

Music Choice Limited (company registration number 2838971) is a
company incorporated in England and Wales with its registered
office at Fleet House, 57-61 Clerkenwell Road, London EC1M 5LA.
 
**********************************************************************
Information in this email is confidential and may be privileged. It is
intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system.
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

-- Binary/unsupported file stripped by Ecartis --
-- Err : No filename to use for decode, file stripped.
-- Type: text/html


--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to