Thanks for this Serge. Is there an easy way to express the timespan as a variable or output from RRDTool to then output via PRINT or GPRINT? I am using a web form with a fairly free method of entering the start and end times and I think I would have to redevelop the pages if I had to express the time in a way that would allow me to convert into seconds easily. (I am using RRDcgi)
Many thanks in advance for any tips or help from anyone. SM -----Original Message----- From: Serge Maandag [mailto:[EMAIL PROTECTED] Sent: 25 November 2002 19:49 To: Simon Mullis; [email protected] Subject: RE: [rrd-users] Area under graph? Use a cdef to multiply the bandwidth by the total timespan of the graph and gprint that cdef. If you need the value in your script, you could PRINT it i.s.o. GPRINTing it. So something like: $timespan = 86400 def:bps=.....path to ds... cdef:bytes=bps,$timespan,* PRINT:bytes:AVERAGE:.... Serge Maandag -----Original Message----- From: Simon Mullis [mailto:[EMAIL PROTECTED] Sent: Monday, November 25, 2002 8:20 PM To: '[email protected]' Subject: [rrd-users] Area under graph? Hello all... OK, I'm using rrdcgi and have written a few web pages that allow the dynamic input of the start / end date or time for the graph generation. My question is quite simply: How can I calculate the total area under a graph? In this case I am interested in the total amount of traffic transferred in a time period. I have the average, from GPRINT:<var>:AVERAGE: .... And I have the time period as a CGI variable. Can I simply multiply them together to get the total traffic transferred? Is there a better way to do it? Is there an undocumented :TOTAL: variable? Help and Thankyou! SM Simon Mullis Service Development Consultant [EMAIL PROTECTED] Equinox Converged Solutions Ltd Tel: +44(0)1252 405 600 Mob: +44(0)7766 087170 http://www.equinoxsolutions.com ---------------------------------------------------------------------------- -------------- Equinox Converged Solutions Limited. Tel: +44 (0)1252 405 600 http://www.equinoxsolutions.com IMPORTANT NOTICE: This message is intended solely for the use of the Individual or organisation to whom it is addressed. It may contain privileged or confidential information. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you should not use, copy, alter, or disclose the contents of this message. All information or opinions expressed in this message and/or any attachments are those of the author and are not necessarily those of Equinox Converged Solutions Limited. Equinox Converged Solutions Limited accepts no responsibility for loss or damage arising from its use, including damage from virus. ---------------------------------------------------------------------------- -------------- -- 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
