The Network People Support Forums

Other TNPI Software => RRDutil => Topic started by: Arie Gerszt on July 22, 2004, 01:56:33 PM

Title: network graphs scaling
Post by: Arie Gerszt on July 22, 2004, 01:56:33 PM
Hello

I am running rrdutil 1.8.1 and seeing big different between the rrdutil rrd graphs and other graphs.

Compare this graphs:
http://www.irdium.ch/rrd/eth0.png
and
http://www.irdium.ch/rrd/snmp.png

I realize the difference between bytes and bits Smile but that cannot be the problem, is it?

Thank you for help.

Arie
Title: Never looked into it...
Post by: donavan on July 22, 2004, 08:06:38 PM
But mine are tottally wrong too:
http://kix.montereybay.com/~donavan/mrtg-day.png

http://kix.montereybay.com/~donavan/rrd-day.gif

and its not just scaling. On yours you can seea big spike on the rrd graph at 15:10, but not on the other. Im guessing rrdutil is doing some 'New Math' somewhere. Ive always just ignored it.
Title: network graphs scaling
Post by: matt on July 25, 2004, 12:11:16 PM
I am aware of it, but I haven't yet looked into it and determined exactly where the error is.
Title: fix suggestions
Post by: Arie Gerszt on July 29, 2004, 12:57:30 AM
Hi

I tried to fix the problem. I believe its correct now Smile

In the rrdutil.pl there's the function GraphNetwork. I changed

original code
      # An octet is a byte!        unless ( $opt_b)           # B is for bytes or octets        {                push @rrdcmd, "-v bytes per second";                push @rrdcmd, "CDEF:inbytes=inoctets,8,\/";                push @rrdcmd, "CDEF:outbytes=outoctets,8,\/";                push @rrdcmd, "AREA:inbytes#00FF00:In ";                push @rrdcmd, GetLegend("inbytes", 4, 0, 0, 1);                push @rrdcmd, "COMMENT:\\n";                push @rrdcmd, "LINE1:outbytes#0000FF:Out";                push @rrdcmd, GetLegend("outbytes", 4, 0, 0, 1);        }


To do some other maths:

        unless ( $opt_b)           # B is for bytes or octets        {                push @rrdcmd, "-v bits per second";                                #push @rrdcmd, "CDEF:inbytes=inoctets,8,\/";                #push @rrdcmd, "CDEF:outbytes=outoctets,8,\/";                push @rrdcmd, "CDEF:inbytes=inoctets,8,\*";                push @rrdcmd, "CDEF:outbytes=outoctets,8,\*";                push @rrdcmd, "AREA:inbytes#00FF00:In ";                push @rrdcmd, GetLegend("inbytes", 4, 0, 0, 1);                push @rrdcmd, "COMMENT:\\n";                push @rrdcmd, "LINE1:outbytes#0000FF:Out";                push @rrdcmd, GetLegend("outbytes", 4, 0, 0, 1);        }


The difference should be, that octets are multiplied by 8, because an octet is a byte and we want to have bits. If I am wrong here, please let me know.

Regards
Arie

PS: To compare see:
http://webmail.swisseasy.net/cgi-bin/rrdutil.pl and
http://swizzy.swisseasy.net/ifgraph/atlas.swisseasy.net.html