Prophidys / RTG2

Realtime Traffic Grapher 2
GNU General Public License v2.0
11 stars 9 forks source link

rtgplot display [GMK]bps, when in fact it is graphing [GMK]Bps #22

Closed Prophidys closed 9 years ago

Prophidys commented 9 years ago

From chr...@cmalton.me.uk on July 13, 2011 04:09:13

What steps will reproduce the problem? 1. Install a fresh build from the sources

  1. Let it run to capture some data
  2. Run a test with known throughput for several minutes, and watch the throughput. What is the expected output? What do you see instead? The graphs should display "Bps" where currently they display "bps". What version of the product are you using? On what operating system? Trunk on Debian 6 Please provide any additional information below. rtgsnmp.c uses the raw if(In|Out)Octets data and squirts it straight into the database, without adjustment. As we are monitoring the Octets (8-bit blocks, AKA bytes) being transferred, not the bits themselves, we should be graphing using the correct units.

Perhaps we should add the ability to set units in the targets.cfg file?

Patch to fix this is attached.

Original issue: http://code.google.com/p/rtg2/issues/detail?id=22

Prophidys commented 9 years ago

From chr...@cmalton.me.uk on July 13, 2011 01:31:00

Update patch to fix it in both places!

Attachment: 001-bps-Bps.patch

Prophidys commented 9 years ago

From chr...@cmalton.me.uk on July 13, 2011 02:16:41

To clarify:

rtgpoll stores data in the database in bytes (octets), and bytes per second rtgplot uses bits, and bits per second to display the data stored by rtgpoll rtg.php displays interface speeds in bits/second.

The two are inconsistent and either: a) rtgpoll should multiply its stored data by 8 b) rtgplot should use bytes per second by default, and rtg.php should display interface speeds in bytes/second.

The latter of these makes more sense to me, as the changes are trivial (as seen in the patch above).

Prophidys commented 9 years ago

From chr...@cmalton.me.uk on July 13, 2011 02:39:11

And here's a 3rd way to fix it:

Adjust rtg.php to put factor=8 into its LO definitions.

Attachment: 001-bps-rtg.php.patch

Prophidys commented 9 years ago

From dan...@fx.net.nz on September 14, 2011 17:40:54

Yeah, rtgplot does as it's told. Currently the php file rtg.php doesn't set the factor value in the CGI parameters to the plot cgi. So minor change to the php script fixes it;

259c259

< output_plot($rid, "ifInOctets", "ifOutOctets", "Traffic+In/Out", $iid, $xplot, $yplot, $bt, $et, "", $lop, $ag);

output_plot($rid, "ifInOctets", "ifOutOctets", "Traffic+In/Out", $iid, $xplot, $yplot, $bt, $et, "", $lop . ",factor=8", $ag);
Prophidys commented 9 years ago

From ced.leco...@gmail.com on February 16, 2012 05:40:57

Status: Duplicate
Mergedinto: 24