[mrtg] 14all.cgi Does Not Scale Correctly with Bits Option

Vic Summerour vicsum at swbell.net
Wed Mar 29 01:07:39 MEST 2000


Don't know whether anyone else has seen this yet, but when using 14all.cgi 
(v1.0p9) with Unscaled and Options: bits, the scale factor does not get 
adjusted.  The following changes made it work correctly.


245,253d244
<       my $factor = 1; # should we scale the values?
<       if ($options{$CGI::log}{perminute}) {
<               $factor = 60; # perminute -> 60x
<       } elsif ($options{$CGI::log}{perhour}) {
<               $factor = 3600; # perhour -> 3600x
<       }
<       if ($options{$CGI::log}{bits}) {
<               $factor *= 8; # bits instead of bytes -> 8x
<       }
262d252
<               if($factor > 1) { $max *= $factor; }

266a257,265
 >       my $factor = 1; # should we scale the values?
 >       if ($options{$CGI::log}{perminute}) {
 >               $factor = 60; # perminute -> 60x
 >       } elsif ($options{$CGI::log}{perhour}) {
 >               $factor = 3600; # perhour -> 3600x
 >       }
 >       if ($options{$CGI::log}{bits}) {
 >               $factor *= 8; # bits instead of bytes -> 8x
 >       }



--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org



More information about the mrtg mailing list