network graphs scaling

Started by Arie Gerszt, July 22, 2004, 01:56:33 PM

Previous topic - Next topic

Arie Gerszt

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" border=0 alt="http://www.irdium.ch/rrd/eth0.png">
and
http://www.irdium.ch/rrd/snmp.png" border=0 alt="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

donavan

But mine are tottally wrong too:
http://kix.montereybay.com/~donavan/mrtg-day.png" target="_blank">http://kix.montereybay.com/~donavan/mrtg-day.png

http://kix.montereybay.com/~donavan/rrd-day.gif" target="_blank">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.

matt

I am aware of it, but I haven't yet looked into it and determined exactly where the error is.

Arie Gerszt

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" target="_blank">http://webmail.swisseasy.net/cgi-bin/rrdutil.pl and
http://swizzy.swisseasy.net/ifgraph/atlas.swisseasy.net.html" target="_blank">http://swizzy.swisseasy.net/ifgraph/atlas.swisseasy.net.html