[rrd-users] Problem with rrdcgi

Hahn, Michael {GY-O~Mannheim} MICHAEL.HAHN at roche.com
Wed Jul 19 13:52:14 MEST 2000


hy,
i have a problem with rrdcgi:

i want to draw a graph of 4 lines, where 2 lines come from 1 rrd and 2 from another.
ther graph works.
i print the average, max and last-values on the bottom of the graph.

so far, so good, but:

when using rrdtool to draw the graph and the stats, all works fine

when using rrdcgi, the stats of the last 2 lines are the stats of the first...!

example:
in rrdtool:
           max   avg   last
link1 in:    1     2      3
link1 out:   4     5      6
link2 in:    7     8      9
link2 out:  10    11     12

in rrdcgi:
           max   avg   last
link1 in:    1     2      3
link1 out:   4     5      6
link2 in:    1     2      3
link2 out:   4     5      6


perl example for rrdtool:
# create lines and legends (also summary info)
  push @args, "LINE2:inutil1#00cc00: Link 1  in";
  push @args, "GPRINT:inutil1:MAX:MAX %3.1lf%%";
  push @args, "GPRINT:inutil1:AVERAGE:AVG %3.1lf%%";
  push @args, "GPRINT:inutil1:LAST:NOW %3.1lf%%\\l";
  push @args, "LINE2:oututil1#0000cc: Link 1 out";
  push @args, "GPRINT:oututil1:MAX:MAX %3.1lf%%";
  push @args, "GPRINT:oututil1:AVERAGE:AVG %3.1lf%%";
  push @args, "GPRINT:oututil1:LAST:NOW %3.1lf%%\\l";
  push @args, "LINE2:inutil2#00ff00: Link 2  in";
  push @args, "GPRINT:inutil2:MAX:MAX %3.1lf%%";
  push @args, "GPRINT:inutil2:AVERAGE:AVG %3.1lf%%";
  push @args, "GPRINT:inutil2:LAST:NOW %3.1lf%%\\l";
  push @args, "LINE2:oututil2#0000ff: Link 2 out";
  push @args, "GPRINT:oututil2:MAX:MAX %3.1lf%%";
  push @args, "GPRINT:oututil2:AVERAGE:AVG %3.1lf%%";
  push @args, "GPRINT:oututil2:LAST:NOW %3.1lf%%\\l";


example rrd-cgi:
	LINE2:inutil1#006600:1
	GPRINT:inutil1:MAX:"MAX %3.1lf%%"
	GPRINT:inutil1:AVERAGE:"AVG %3.1lf%%"
	GPRINT:inutil1:LAST:"NOW %3.1lf%%"
	LINE2:oututil1#000066:1
	GPRINT:oututil1:MAX:"MAX %3.1lf%%"
	GPRINT:oututil1:AVERAGE:"AVG %3.1lf%%"
	GPRINT:oututil1:LAST:"NOW %3.1lf%%"
	LINE2:inutil2#009900:2
	GPRINT:inutil2:MAX:"MAX %3.1lf%%"
	GPRINT:inutil2:AVERAGE:"AVG %3.1lf%%"
	GPRINT:inutil2:LAST:"NOW %3.1lf%%"
	LINE2:oututil2#000099:2
	GPRINT:oututil2:MAX:"MAX %3.1lf%%"
	GPRINT:oututil2:AVERAGE:"AVG %3.1lf%%"
	GPRINT:oututil2:LAST:"NOW %3.1lf%%"



--
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