Dear All,

can I ask for some pointers please. in my FreeRADIUS Version 2.1.8, for host x86_64-pc-linux-gnu (Ubuntu LTS 10.04) installation I have followed the Gigabyte instructions on the FreeRADIUS wiki's FAQ http://wiki.freeradius.org/FAQ#Why+do+Acct-Input-Octets+and+Acct-Output-Octets+wrap+at+4+GB%3F. The Usage is calculated correctly, but the check_item value is not what I expect to see (1.7 GB as opposed th 6GB set in radcheck). I understand who the system determines the counter value and it is correctly calculated, but where does the check_item vlaue of 1.7GB come from? I have no idea to be truthful. 

Any pointers welcome. 

Thanks in advance.


Here the data/logs:

Here the relevant debug log:
Sat Jun  4 23:10:21 2011 : Debug: rlm_sqlcounter: Entering module authorize code
Sat Jun  4 23:10:21 2011 : Debug: sqlcounter_expand:  'SELECT IFNULL(SUM(AcctInputOctets) + SUM(AcctOutputOctets),0) FROM radacct WHERE UserName='%{User-Name}''
Sat Jun  4 23:10:21 2011 : Info: [noresettotal]         expand: SELECT IFNULL(SUM(AcctInputOctets) + SUM(AcctOutputOctets),0) FROM radacct WHERE UserName='%{User-Name}' -> SELECT IFNULL(SUM(AcctInputOctets) + SUM(AcctOutputOctets),0) FROM radacct WHERE UserName='lapzel14'
Sat Jun  4 23:10:21 2011 : Debug: sqlcounter_expand:  '%{sql03:SELECT IFNULL(SUM(AcctInputOctets) + SUM(AcctOutputOctets),0) FROM radacct WHERE UserName='lapzel14'}'
Sat Jun  4 23:10:21 2011 : Info: [noresettotal] sql_xlat
Sat Jun  4 23:10:21 2011 : Info: [noresettotal]         expand: %{User-Name} -> lapzel14
Sat Jun  4 23:10:21 2011 : Info: [noresettotal] sql_set_user escaped user --> 'lapzel14'
Sat Jun  4 23:10:21 2011 : Info: [noresettotal]         expand: SELECT IFNULL(SUM(AcctInputOctets) + SUM(AcctOutputOctets),0) FROM radacct WHERE UserName='lapzel14' -> SELECT IFNULL(SUM(AcctInputOctets) + SUM(AcctOutputOctets),0) FROM radacct WHERE UserName='lapzel14'
Sat Jun  4 23:10:21 2011 : Info: [noresettotal]         expand: /var/log/freeradius/sqltrace.sql -> /var/log/freeradius/sqltrace.sql
Sat Jun  4 23:10:21 2011 : Debug: rlm_sql (sql03): Reserving sql socket id: 3
Sat Jun  4 23:10:21 2011 : Debug: rlm_sql_mysql: query:  SELECT IFNULL(SUM(AcctInputOctets) + SUM(AcctOutputOctets),0) FROM radacct WHERE UserName='lapzel14'
Sat Jun  4 23:10:21 2011 : Info: [noresettotal] sql_xlat finished
Sat Jun  4 23:10:21 2011 : Debug: rlm_sql (sql03): Released sql socket id: 3
Sat Jun  4 23:10:21 2011 : Info: [noresettotal]         expand: %{sql03:SELECT IFNULL(SUM(AcctInputOctets) + SUM(AcctOutputOctets),0) FROM radacct WHERE UserName='lapzel14'} -> 2147513300
Sat Jun  4 23:10:21 2011 : Debug: rlm_sqlcounter: (Check item - counter) is less than zero
Sat Jun  4 23:10:21 2011 : Debug: rlm_sqlcounter: Rejected user lapzel14, check_item=1705032704, counter=2147513300
Sat Jun  4 23:10:21 2011 : Info: ++[noresettotal] returns reject

Definition of the noresettotal module in counter.conf:
sqlcounter noresettotal {
        counter-name = Max-All-Total-Octets
        check-name = Max-All-Total
        reply-name = ChilliSpot-Max-Total-Octets
        sqlmod-inst = sql03
        key = User-Name
        reset = never
        query = "SELECT IFNULL(SUM(AcctInputOctets) + SUM(AcctOutputOctets),0) FROM radacct WHERE UserName='%{%k}'"
}

and here the radcheck values for user 'lapzel14':
Full Texts id UserName Attribute op Value
Edit Delete 572098 lapzel14 User-Password :=loxdas
Edit Delete 572102 lapzel14 Expiration :=1311932528
Edit Delete 572106 lapzel14 Simultaneous-Use :=1
Edit Delete 572110 lapzel14 Max-All-Total :=6000000000