Maximum size Input-Octets/Output-Octets

Guy Fraser guy at incentre.net
Mon Sep 26 17:44:36 CEST 2005


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. ;^)





More information about the Freeradius-Users mailing list