Problem with rml_sqlcounter with GigaByte datavolume

nfourel nicolas.fourel at adipsys.com
Wed Sep 14 09:25:05 CEST 2011


Hi,

 

Here is the result of the SQL Query :

 

SELECT SUM(AcctInputOctets) FROM radacct WHERE  UserName='foo at bar.com';

 

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 UserName='foo at bar.com'

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 UserName='foo at bar.com'}'

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} -> foo at bar.com

Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : sql_set_user escaped user --> 'foo at bar.com'

Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets :  expand: SELECT SUM(AcctInputOctets) FROM radacct WHERE UserName='foo at bar.com' -> SELECT SUM(AcctInputOctets) FROM radacct WHERE UserName='foo at bar.com'

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 UserName='foo at bar.com'

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 UserName='foo at bar.com'} -> 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 foo at bar.com, check_item=0, counter=68882

 

Any idea ?

 

Thanks for your help

 

Nicolas

 

De : Suman Dash [via FreeRadius] [mailto:ml-node+s1045715n4799383h91 at n5.nabble.com] 
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 ?
>

http://git.freeradius.org/

3.x.x is currently in development on the master branch.

-Arran

Arran Cudbard-Bell
[hidden email]

RADIUS - Waging war on ignorance and apathy one Access-Challenge at a time.


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


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



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

  _____  

If you reply to this email, your message will be added to the discussion below:

http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-GigaByte-datavolume-tp4455164p4799383.html 

To unsubscribe from Problem with rml_sqlcounter with GigaByte datavolume, click here <http://freeradius.1045715.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4455164&code=bmljb2xhcy5mb3VyZWxAYWRpcHN5cy5jb218NDQ1NTE2NHwtNTg2MjUyMTkw> . 



--
View this message in context: http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-GigaByte-datavolume-tp4455164p4801856.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20110914/349c94bb/attachment.html>


More information about the Freeradius-Users mailing list