Is there way to convert output octets and input octets to KB

Mustafa Nassir mustafa.n.gaid at
Sun Jun 16 13:29:27 CEST 2019

Exactly, the first part of your reply is what happen in my case if I need
to use 64 bits how can I do that in freeradius ?

في الأحد، ١٦ يونيو، ٢٠١٩ ٢:١٧ م Alan DeKok <aland at> كتب:

> On Jun 15, 2019, at 4:49 PM, Mustafa Nassir <mustafa.n.gaid at>
> wrote:
> > As I say from title is there any way to convert output and input octets
> to
> > KB because I have small problem when I add to mysql value with 12 number
> in
> > radtest I get small error it's give me the result just 10 number and note
> > what I insert in SQL , I insert I SQL 10737418240 to limit my users 10 GB
> > for total octets but in radtest I get other result but if I add 10 8
> number
> > I get same number in result any help for this ?
>   That's a rather confused question.  From what I can tell, there are a
> few issues.
>   One is that you can't use Acct-Input-Octets or Acct-Output-Octets to
> hold more than 4G of data.  Those attributes are defined to be 32 bits.
> For larger counters, see Acct-Input-Gigawords.  Which is defined to be the
> number of times Acct-Input-Octets has rolled over 4G.
>   The default SQL schema allows FreeRADIUS to store more than 4G of
> counters in the DB.  The default SQL queries use both  Acct-Input-Octets
> and Acct-Input-Gigawords to calculate the correct 64-bit values to store in
> SQL.
>   So that should work.
>   It also looks like you're trying to *limit* user downloads via some
> attribute.  You say:
> >  I insert I SQL 10737418240 to limit my users 10 GB
> > for total octets
>   Which is vague to the point of uselessness.  WHERE in SQL do you insert
> these values?
>   If you're trying to enforce download limits on users, this isn't part of
> standard RADIUS.  You cannot put Acct-Input-Octets into an Access-Accept,
> and expect that the NAS will enforce that.  You have to read the NAS
> documentation to see (1) if the NAS is capable of this, and (2) which
> vendor-specific attributes to use.
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See

More information about the Freeradius-Users mailing list