check_item=0 , See why Max-Input-Octets is returned as 0 .

On Wed, Sep 14, 2011 at 12:55 PM, nfourel <nicolas.fourel@adipsys.com> wrote:

Hi,

 

Here is the result of the SQL Query :

 

SELECT SUM(AcctInputOctets) FROM radacct WHERE  [hidden email]';

 

SUM(AcctInputOctets)

68882

 

And freeradius log for the counter section :

 

Wed Sep 14 09:17:45 2011 : Debug: rlm_sqlcounter: Entering module authorize code

Wed Sep 14 09:17:45 2011 : Debug: WARNING: Please replace '%k' with '${key}'

Wed Sep 14 09:17:45 2011 : Debug: sqlcounter_expand:  'SELECT SUM(AcctInputOctets) FROM radacct WHERE UserName='%{User-Name}''

Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets :  expand: SELECT SUM(AcctInputOctets) FROM radacct WHERE UserName='%{User-Name}' -> SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email]'

Wed Sep 14 09:17:45 2011 : Debug: WARNING: Please replace '%S' with '${sqlmod-inst}'

Wed Sep 14 09:17:45 2011 : Debug: sqlcounter_expand:  '%{sql:SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email]'}'

Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : sql_xlat

Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets :  expand: %{User-Name} -> [hidden email]

Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : sql_set_user escaped user --> '[hidden email]'

Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets :  expand: SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email]' -> SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email]'

Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets:  expand: /usr/local/var/log/radius/sqltrace.sql -> /usr/local/var/log/radius/sqltrace.sql

Wed Sep 14 09:17:45 2011 : Debug: rlm_sql (sql): Reserving sql socket id: 0

Wed Sep 14 09:17:45 2011 : Debug: rlm_sql_mysql: query:  SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email]'

Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets: sql_xlat finished

Wed Sep 14 09:17:45 2011 : Debug: rlm_sql (sql): Released sql socket id: 0

Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets :  expand: %{sql:SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email]'} -> 68882

Wed Sep 14 09:17:45 2011 : Debug: rlm_sqlcounter: (Check item - counter) is less than zero

Wed Sep 14 09:17:45 2011 : Debug: rlm_sqlcounter: Rejected user [hidden email], check_item=0, counter=68882

 

Any idea ?

 

Thanks for your help

 

Nicolas

 

De : Suman Dash [via FreeRadius] [mailto:[hidden email]]
Envoyé : mardi 13 septembre 2011 19:44
À : nfourel


Objet : Re: Problem with rml_sqlcounter with GigaByte datavolume

 

SELECT SUM(AcctInputOctets) FROM radacct WHERE  UserName='username'



Run the above query in mysql and post the result

then post the freeradius log specific to this section.

On Tue, Sep 13, 2011 at 10:00 PM, Nicolas FOUREL <[hidden email]> wrote:

Hi Arran,

I have get version 3.0.0 with 64 bit counters support from Git and installed
it. Unfortunatly, I still have the same problem with my sql counter which
has always "check_item=0" when I put a value bigger than 2^32. On
Access-Request in debug mode, I have the following lines :

Tue Sep 13 18:20:47 2011 : Debug: rlm_sqlcounter: (Check item - counter) is
less than zero
Tue Sep 13 18:20:47 2011 : Debug: rlm_sqlcounter: Rejected user [hidden email],

check_item=0, counter=68882

Here is my counter definition :
sqlcounter totalinputoctets {
       counter-name = Total-Max-Input-Octets
       check-name = Max-Input-Octets
       reply-name = ChilliSpot-Max-Input-Octets
       sqlmod-inst = sql
       key = User-Name
       reset = never
       query = "SELECT SUM(AcctInputOctets) FROM radacct WHERE
UserName='%{%k}'"
}

I have added "Max-Input-Octets" in the dictionary file like that :
ATTRIBUTE       Max-Input-Octets        3001    integer64

In radcheck table:
[hidden email]                     Max-Input-Octets                :=

107374182400


Did I miss a thing ?

Many thanks

Nicolas

-----Message d'origine-----
De :
freeradius-users-bounces+nicolas.fourel=[hidden email]
[mailto:[hidden email]=[hidden email]

.org] De la part de Arran Cudbard-Bell
Envoyé : lundi 12 septembre 2011 11:46
À : FreeRadius users mailing list
Objet : Re: Problem with rml_sqlcounter with GigaByte datavolume



On 12 Sep 2011, at 10:20, nfourel wrote:

> Thanks for your reply but I can't find any version 3.x.x of freeRADIUS.
Where
> can I find it ?
>

click here.


View this message in context: RE: Problem with rml_sqlcounter with GigaByte datavolume

Sent from the FreeRadius - User mailing list archive at Nabble.com.

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