Check_Item Is Always Equal To 0 When 2^32

Russell Mike radius.sir at gmail.com
Thu Oct 24 13:35:30 CEST 2013


On Tue, Oct 22, 2013 at 6:34 PM, Alan DeKok <aland at deployingradius.com>wrote:

> Russell Mike wrote:
> > i understand that, My NAS support Gigaword
> > attribute,ChilliSpot-Max-Total-Octets-Gigaword should contain upper 32
> > bit value of 64 bit number. i am using
> >  ChilliSpot-Max-Total-Octets-Gigaword also. No?
>
>   Yes.
>
> > *Check: 8GB*
> > ChilliSpot-Max-Input-Octets - Value 8589934592
> > ChilliSpot-Max-Input-Gigawords - Value 8589934592
>
>   Uh... no.
>
> > which counter is 64 bit ?
>
>   Did you read what you wrote at the start of the message?  This isn't
> rocket science.  It's simple math.
>
>   The "octets" attribute is the lower 32 bits of a 64-bit counter.  The
> "gigawords" attribute is the upper 32 bits of a 64-bit counter.
>
>   If you want to set a limit, write it down as a 64-bit number.  Put the
> upper 32 bits into the "gigawords" attribute.  Put the lower 32 bits
> into the "octets" attributes.
>
>   I can't make it any clearer than that.
>


Dear Alan

thank you very very much, it is great explanation. Your response made
many things very clearer. But did not work for me still. Perhaps my formula
is wrong. Kindly help one more step further. Honestly, i have tried very
hard, working on it for some weeks now without results. i.e. i want to set
6GB limit.

total bytes in 6GB = 805306368
total bytes in 4GB = 536870912

i deducted 4GB bytes from 6GB bytes to get upper 32bit number = 268435456

i put 536870912 in ChilliSpot-Max-Input-Octets
i put 268435456 in ChilliSpot-Max-Input-Gigawords

*counters module: *
sqlcounter    *lower32_bitcounter* {
              counter-name = Acct-Input-Octets
              check-name = Acct-Input-Octets
              reply-name = Session-Timeout
              sqlmod-inst = sql
              key = User-Name
              reset = never
              cache-size = 5000
              query = "SELECT (SUM(AcctInputOctets) +
SUM(AcctOutputOctets)) FROM radacct WHERE UserName='%{%k}'"
}

sqlcounter    *uper32_bitcounter* {
              counter-name = Acct-Input-Octets-Gigawords
              check-name = Acct-Input-Octets-Gigawords
              reply-name = Session-Timeout
              sqlmod-inst = sql
              key = User-Name
              reset = never
              cache-size = 5000
              query = "SELECT (SUM(AcctInputOctets) +
SUM(AcctOutputOctets)) FROM radacct WHERE UserName='%{%k}'"
}

Million Thanks
RM --


>
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20131024/41ed4725/attachment.html>


More information about the Freeradius-Users mailing list