[rrd-users] Re: GRAPH using Several sources

Jay Ford jay-ford at uiowa.edu
Thu Jun 6 15:14:35 MEST 2002


On Wed, 5 Jun 2002, Smith, Brent wrote:
> I am trying to sum data from several (100+) different sources an display
> them on a graph. Here is one of my smaller examples:
>
> /usr/local/rrdtool-1.0.33/bin/rrdtool graph
> /usr/home/bsmith/public_html/gifs/temp.OUT.gif \
> --lazy --start -2d --end now \
> -v "bps Out" -w 600 -h 150 -r -t "48 Hours-Bandwidth Out" \
> DEF:cellsout0=/usr/home/bsmith/trunkdata/mptrrd/atlnga502-Sfldmi501.rrd:cell
> sout:AVERAGE \
> DEF:cellsout1=/usr/home/bsmith/trunkdata/mptrrd/atlnga502-amstne501.rrd:cell
> sout:AVERAGE \
> DEF:cellsout2=/usr/home/bsmith/trunkdata/mptrrd/atlnga502-amstne502.rrd:cell
> sout:AVERAGE \
> DEF:cellsout3=/usr/home/bsmith/trunkdata/mptrrd/atlnga502-anhmca501.rrd:cell
> sout:AVERAGE \
> .
> .
> .
> DEF:cellsout82=/usr/home/bsmith/trunkdata/mptrrd/atlnga502-zurisw501.rrd:cel
> lsout:AVERAGE \
> CDEF:bitsout8=cellsout81,cellsout82,424,+,* \
> CDEF:bitsout0=cellsout0,cellsout1,cellsout2,cellsout3,cellsout4,cellsout5,ce
> llsout6,cellsout7,cellsout8,cellsout9,cellsout10,424,+,+,+,+,+,+,+,+,+,+,* \

The previous response from Alex about unknown values is most likely your
problem.

You might also double-check your RPN math.  My guess is that you're trying to
add a bunch of numbers & then multiply the sum by 424, such as:
   bitsout0 = (cellsout0+cellsout1+ ... cellsout9+cellsout10) * 424
Correct?  That's not what your stuff does.  RPN math uses a stack for
operands, with the operators operating on the operands at the top of the
stack, so your stuff does:
   bitsout0 = cellsout0 * (cellsout1+ ... cellsout9+cellsout10+424)
What you probably want is:
   CDEF:bitsout0=cellsout0,cellsout1,cellsout2,cellsout3,cellsout4,cellsout5,cellsout6,cellsout7,cellsout8,cellsout9,cellsout10,+,+,+,+,+,+,+,+,+,+,424,*

or equivalently (& arguably/subjectively clearer):
   CDEF:bitsout0=cellsout0,cellsout1,+,cellsout2,+,cellsout3,+,cellsout4,+,cellsout5,+,cellsout6,+,cellsout7,+,cellsout8,+,cellsout9,+,cellsout10,+,424,*

Also, you could pull the ",424,*" out of the intermediate sums & just apply
it to the final sum.  Right?

________________________________________________________________________
Jay Ford, Network Engineering Group, Information Technology Services
University of Iowa, Iowa City, IA 52242
email: jay-ford at uiowa.edu, phone: 319-335-5555, fax: 319-335-5505

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list