Maximum size Input-Octets/Output-Octets

Jonathan De Graeve Jonathan.De.Graeve at imelda.be
Mon Sep 26 17:49:25 CEST 2005


So is it 2147483648 or 2147483647?

J.

--
Jonathan De Graeve
Network/System Administrator
Imelda vzw
Informatica Dienst
015/50.52.98
Jonathan.de.graeve at imelda.be

-----Oorspronkelijk bericht-----
Van: freeradius-users-bounces at lists.freeradius.org
[mailto:freeradius-users-bounces at lists.freeradius.org] Namens Guy Fraser
Verzonden: maandag 26 september 2005 17:45
Aan: freeradius-users at lists.freeradius.org
Onderwerp: RE: Maximum size Input-Octets/Output-Octets

On Fri, 2005-23-09 at 19:42 +0200, Jonathan De Graeve wrote:
> >  What "radacct" are you talking about?  The Acct-Input-Octets stops
> >at 2G because the RFC dictates that it's a 32-bit integer.  That's
why
> >the Acct-Input-Gigawords attribute was defined.  It goes past 2G.
> 
> I'm talking about the detail file from freeradius.
> 
> This is what I found in RFC2869
> 
> 5.1.  Acct-Input-Gigawords
> 
>    Description
> 
>       This attribute indicates how many times the Acct-Input-Octets
>       counter has wrapped around 2^32 over the course of this service
>       being provided, and can only be present in Accounting-Request
>       records where the Acct-Status-Type is set to Stop or Interim-
>       Update.
> 
> So I assumed that the wrapping went @ 4GB instead of 2GB
> 
> >From RFC2866:
> 
> Value
> 
>       The Value field is four octets.
> 
> Also:
> 
>   integer  32 bit unsigned value, most significant octet first.
> 
> So its 32bit. (4GB right??)
> 
> I will use 2147483647 for now. But I can't find the definition which
> says that it should be 2GB so I need to be sure.
> 
> J.
What is right and what is in common use may be two different things.

In my experience, some NAS vendors generate negative numbers when 
the Octet Value is greater than 2^31.

By the way a GigaWord is 2147483648 bytes since a Word = 2 Bytes 
and Giga = 1024*1024*1024 = 1073741824. It would therefore make 
sense to use a modulo of 2147483648 for the Octet value which holds
the "remainder" of the full byte count.

Just in case you were wondering what a TeraQuad was after watching a
Star Trek NG episode it is 4398046511104 Bytes. ;^)


- 
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html







More information about the Freeradius-Users mailing list