[rrd-users] Re: Division Bug with RRDTool

Rodrigo Santos rodrigo.santos at quantiza.com
Sat Dec 10 02:30:03 MET 2005


Hi Serge,

he forgives but I do not have much knowledge to write scripts in rrdtool
(rrdcreate, rrdupdate), but am sending it my .rrd archives and Makefile
script so that you he can try to help me...

Rrdgraph will be in this format:

/usr/local/bin/rrdtool graph  totals.png
	--interlaced
	--imgformat "PNG"
	--width 640
	--height 150
	-v 'megabits/sec'
	-t ''script': I/O by Network (Mb/s)'
	-s $(/usr/bin/perl -e '$when = time - 24*60*60; if (0 == 923671800 ||
923671800 > $when) { print "923671800" } else { print $when } ')
	DEF:total_out_bytes=/total.rrd:out_bytes:AVERAGE
	DEF:total_in_bytes=/total.rrd:in_bytes:AVERAGE
	CDEF:total_bytes=total_out_bytes,total_in_bytes,+
	CDEF:total_Mbps=total_bytes,.000008,*
	DEF:xsubnet_out_bytes=/subnet.rrd:out_bytes:AVERAGE
	DEF:xsubnet_in_bytes=/subnet.rrd:in_bytes:AVERAGE
	CDEF:xsubnet_bytes=xsubnet_out_bytes,xsubnet_in_bytes,+
	CDEF:subnet_Mbps=xsubnet_bytes,.000008,*
	DEF:MCAST_in_bytes=/MCAST.rrd:in_bytes:AVERAGE
	DEF:MCAST_out_bytes=/MCAST.rrd:out_bytes:AVERAGE
	CDEF:MCAST_in_Mbps=MCAST_in_bytes,.000008,*
	CDEF:MCAST_out_Mbps=MCAST_out_bytes,.000008,*
	CDEF:MCAST_Mbps=MCAST_out_Mbps,MCAST_in_Mbps,+
	CDEF:TOTAL_Mbps=MCAST_Mbps,total_Mbps,+
	'CDEF:mcast_pct=MCAST_Mbps,TOTAL_Mbps,/,100,*'
	'CDEF:subnet_in_bytes_pct=xsubnet_in_bytes'
	'CDEF:subnet_out_bytes_pct=xsubnet_out_bytes'
	'CDEF:subnet_bytes_pct=xsubnet_bytes'
	'CDEF:subnet_Mbps_pct=subnet_Mbps'
	'CDEF:TOTAL_Mbps_pct=TOTAL_Mbps'
	'CDEF:total_Mbps_pct=total_Mbps'
	'CDEF:div_Mbps_pct=subnet_Mbps,TOTAL_Mbps,/'
	'CDEF:subnet_pct=subnet_Mbps,100,*,TOTAL_Mbps,/'
	AREA:subnet_Mbps#880000:'subnet'
	LINE1:TOTAL_Mbps#000000:'TOTAL I/O'
	COMMENT:'\n'
	COMMENT:'\n'
	GPRINT:subnet_pct:AVERAGE:'subnet %.1lf%%'
	GPRINT:subnet_in_bytes_pct:AVERAGE:'subnet IN BYTES %lf'
	GPRINT:subnet_out_bytes_pct:AVERAGE:'subnet OUT BYTES %lf'
	GPRINT:subnet_bytes_pct:AVERAGE:'subnet BYTES (IN+OUT) %lf'
	GPRINT:subnet_Mbps_pct:AVERAGE:'subnet Mbps (BYTES*0.000008) %lf'
	GPRINT:TOTAL_Mbps_pct:AVERAGE:'TOTAL Mbps %lf'
	GPRINT:total_Mbps_pct:AVERAGE:'total Mbps %lf'
	GPRINT:div_Mbps_pct:AVERAGE:'DIV (subnet/TOTAL)Mbps %lf'
	GPRINT:mcast_pct:AVERAGE:'MCAST %.1lf%%'

Rodrigo


-- Attached file removed by Ecartis and put at URL below --
-- Type: application/x-zip-compressed
-- Size: 88k (90191 bytes)
-- URL : http://lists.ee.ethz.ch/p/script.zip


--
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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list