[mrtg] Re: max int error

Duane Beck dbeck at legendent.com
Tue Mar 21 18:36:58 MET 2000


Depends on whether you're talking about signed or unsigned integers.
(2^31)-1 is the maximum for signed ints.

Duane Beck

----- Original Message -----
From: Dan Wentzel
To: 'Justin Lott' ; mrtg at list.ee.ethz.ch
Sent: Tuesday, March 21, 2000 1:48 PM
Subject: [mrtg] Re: max int error


Is it just me, or is (2^31)-1 <  2488000000 < (2^32)-1  ?

Which is the correct exponent, 31 or 32?

-----Original Message-----
From: Justin Lott [SMTP:lottj at millbrookprinting.com]
Sent: Tuesday, March 21, 2000 2:14 AM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] Re: max int error

Im running into this problem too when trying to graph disk
utilization (2.8.12 on *BSD). I can find the maxint arguments but
have no idea how to fix it.

      'maxbytes[]' =>
      ['(($arg =~ /^[0-9]+$/) && ($arg <= (2**31)-1))',
         '"$arg must be a Number smaller than maxint"'],

      'maxbytes1[]' =>
      ['(($arg =~ /^[0-9]+$/) && ($arg < (2**31)-1))',
         '"$arg must be a Number smaller than maxint"'],

      'maxbytes2[]' =>
      ['(($arg =~ /^[0-9]+$/) && ($arg < (2**31)-1))',
         '"$arg must be a Number smaller than maxint"'],


>I'm not sure I understand, isn't (2^32-1) = 4294967295 greater than
>2488000000.
>
>lists at ripper.informatik.uni-ulm.de wrote:
>>
>>  > I'm currently running mrtg-2.8.8 on Solaris 2.5.1.  We've just
>>  > installed an OC48 POS interface 2488 Mb/s and want MRTG to monitor it.
>>  >
>>  > I'm graphing bits/s on my graphs
>>
>>  You mean "Options[..]: bits"?
>>
>>  > and configure the MaxBytes option
>>  > with the actual bit/s value of an interface in order to calculate
>>  > the utilized percentage.
>>
>>  > MaxBytes[router]: 2488000000
>>
>>  This is still Max_Bytes_, i.e. 311000000. rateup will do the
bytes-to-bits
>>  calculation for MaxBytes for you.
>>
>>  > CFG Error in "maxbytes[router]", line 126: 2488000000 must be a Number
>>  > smaller than maxint.
>>
>>  mrtg refuses to handle MaxBytes values bigger than 'maxint' (2^32-1).
I'm
>>  not sure why.
>>
>>  Rainer
>  > --
>  > Rainer.Bawidamann at informatik.uni-ulm.de

--
-----------------------------------------------
PGP Public key at: http://pgpkeys.mit.edu:11371/
-----------------------------------------------
Justin Lott
Systems Engineer
Millbrook Printing Company
http://www.millbrookprinting.com


--
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