[mrtg] Re: MRTG/UseRRDTool - Bits vs. Bytes?

Mark T. Ganzer ganzer at spawar.navy.mil
Tue Nov 2 18:16:58 MET 1999


--------------msC83CFE895E9DD5A11527FE39
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Raymond Lucas (rlucas at baytech.com.au) sent me the following code snippet to fix the
bits labelling problem with 14all.cgi, and my graphs are  now displaying
correctly.  14all.cgi was already handling the bytes to bits conversion when I
compared it to a regular MRTG graph of the same device - just the labels were
wrong.

This section should be added following the line "if (!defined
$CGI::small) {":

# Check if we are using bits
if( defined $options{$CGI::log}{bits} ) {
        # If any of the following are not set, ie they use the defaults,
        # set things to "Bits per Second"
        if( $options{$CGI::log}{bits} == 1 ) {
                $targets{$CGI::log}{legend1} = "Incoming Traffic in Bits per
Second"
unless !( $targets{$CGI::log}{legend1} );
                $targets{$CGI::log}{legend2} = "Outgoing Traffic in Bits per
Second"
unless !( $targets{$CGI::log}{legend2} );
                $targets{$CGI::log}{ylegend} = "Bits per Second" unless !(
$targets{$CGI::log}{ylegend} );
        }
}


Tobias Oetiker wrote:

> Today you sent me mail regarding [mrtg] Re: MRTG/UseRRDTool - Bits vs. Bytes?:
>
> *> [bits/second instead of bytes/second with 14all]
> *>
> *> > Both MRTG and RRD store bytes per second.  14all is work in progress
> *> > (altough I read that the author won't do much more about the script IIRC)
> *> > so it is very well possible that it doesn't know about the Bits option.
> *> > "grep -i bits 14all.cgi" is remarkably silent :-)
> *>
> *> I won't do much more but it is/was work in progress and I did some work on
> *> the script ;-) The "bits" option is in 14all since version 0.3 (MRTG 2.8.8
> *> contains 0.2), the actual version is 0.9 (I'll try to get it into mrtg but I
> *> _have_ to do some work for this so be patient).
>
> mrtg-2.8.9 (hint hint) comes with 0.9 ...
>
> cheers
> tobi
> *>
> *> > Ofcourse you'd need to modify other things, especially labels ...
> *>
> *> Yes, that's missing: I was too lazy to change the labels (the defaults) when
> *> option bits is set.
> *>
> *> Bye ... Rainer
> *>
>
> --
>  ______    __   _
> /_  __/_  / /  (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
>  / // _ \/ _ \/ / TEL: +41(0)1-6325286  FAX:...1517  ICQ: 10419518
> /_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker
>
> --
> * To unsubscribe from the mrtg mailing list, send a message with the
>   subject: unsubscribe to mrtg-request at list.ee.ethz.ch
> * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg

--
- Mark T Ganzer            ganzer at spawar.navy.mil
Space and Naval Warfare Systems Center, San Diego
Ph: 619.553.1186   FAX: 619.553.4385    Mobile: 619.203.1790


--------------msC83CFE895E9DD5A11527FE39
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIIJggYJKoZIhvcNAQcCoIIJczCCCW8CAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC
B44wggOXMIIDAKADAgECAgIS+jANBgkqhkiG9w0BAQUFADBcMQswCQYDVQQGEwJVUzEYMBYG
A1UEChMPVS5TLiBHb3Zlcm5tZW50MQwwCgYDVQQLEwNEb0QxDDAKBgNVBAsTA1BLSTEXMBUG
A1UEAxMOTWVkIEVtYWlsIENBLTEwHhcNOTkwOTI5MjE1NjEzWhcNMDEwOTI5MjE1NjEzWjCB
mzELMAkGA1UEBhMCVVMxGDAWBgNVBAoTD1UuUy4gR292ZXJubWVudDEMMAoGA1UECxMDRG9E
MQwwCgYDVQQLEwNQS0kxDDAKBgNVBAsTA1VTTjEhMB8GA1UEAxMYR2FuemVyLk1hcmsuVC4w
MjAwMDU5MDYyMSUwIwYJKoZIhvcNAQkBFhZnYW56ZXJAc3Bhd2FyLm5hdnkubWlsMIGfMA0G
CSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBCuvhkwVNdVBda8dh4vlyquW6oKvtWqGtj4M5nuBk
E8KPC3VS8RnyVlA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GDAWBgNVBAoTD1UuUy4gR292ZXJubWVudDEMMAoGA1UE
CxMDRG9EMQwwCgYDVQQLEwNQS0kxFzAVBgNVBAMTDk1lZCBFbWFpbCBDQS0xAgIS+jAJBgUr
DgMCGgUAoIGxMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTk5
MTEwMjE3MTY1OFowIwYJKoZIhvcNAQkEMRYEFAZBwc+R4nQH8fpPwSOHGCYchCZ/MFIGCSqG
SIb3DQEJDzFFMEMwCgYIKoZIhvcNAwcwDgYIKoZIhvcNAwICAgCAMAcGBSsOAwIHMA0GCCqG
SIb3DQMCAgFAMA0GCCqGSIb3DQMCAgEoMA0GCSqGSIb3DQEBAQUABIGAIg+xFpD6XIwIqZGP
/lLt2lQQnFkuMgI4ntQlg45lliybAznfZ5HCrWFzTGQlncj6YkBRxc0Icaa1GMBgCvzPsvsm
3A5ortEo4L2TGzI8e8wDoKC7CsciMRl9Dp3U1/CDI7A9cPjCyf/NsC2kf7aqcW7E/b+gOwlM
bC2VwPnHmHw=
--------------msC83CFE895E9DD5A11527FE39--

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list