Problem with rml_sqlcounter with GigaByte datavolume
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-Octe.... 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': [image: Full Texts]<http://login02.chillifire.net/phpmyadmin/sql.php?db=radius&table=radcheck&sql_query=SELECT+%2A++FROM+%60radcheck%60+WHERE+%60UserName%60+LIKE+%27lapzel14%27&goto=sql.php%3Fdb%3Dradius%26amp%3Btable%3Dradcheck%26amp%3Btoken%3Ddf845dec99ab8224acc2d1d0fceddd89%26amp%3Bsql_query%3DSELECT%2B%252A%2B%2BFROM%2B%2560radcheck%2560%2BWHERE%2B%2560UserName%2560%2BLIKE%2B%2527lapzel14%2527&display_options_form=1&display_text=F&token=df845dec99ab8224acc2d1d0fceddd89> id<http://login02.chillifire.net/phpmyadmin/sql.php?db=radius&table=radcheck&sql_query=SELECT+%2A++FROM+%60radcheck%60+WHERE+%60UserName%60+LIKE+%27lapzel14%27+ORDER+BY+%60radcheck%60.%60id%60+ASC&token=df845dec99ab8224acc2d1d0fceddd89> UserName<http://login02.chillifire.net/phpmyadmin/sql.php?db=radius&table=radcheck&sql_query=SELECT+%2A++FROM+%60radcheck%60+WHERE+%60UserName%60+LIKE+%27lapzel14%27+ORDER+BY+%60radcheck%60.%60UserName%60+ASC&token=df845dec99ab8224acc2d1d0fceddd89> Attribute<http://login02.chillifire.net/phpmyadmin/sql.php?db=radius&table=radcheck&sql_query=SELECT+%2A++FROM+%60radcheck%60+WHERE+%60UserName%60+LIKE+%27lapzel14%27+ORDER+BY+%60radcheck%60.%60Attribute%60+ASC&token=df845dec99ab8224acc2d1d0fceddd89> op<http://login02.chillifire.net/phpmyadmin/sql.php?db=radius&table=radcheck&sql_query=SELECT+%2A++FROM+%60radcheck%60+WHERE+%60UserName%60+LIKE+%27lapzel14%27+ORDER+BY+%60radcheck%60.%60op%60+ASC&token=df845dec99ab8224acc2d1d0fceddd89> Value<http://login02.chillifire.net/phpmyadmin/sql.php?db=radius&table=radcheck&sql_query=SELECT+%2A++FROM+%60radcheck%60+WHERE+%60UserName%60+LIKE+%27lapzel14%27+ORDER+BY+%60radcheck%60.%60Value%60+ASC&token=df845dec99ab8224acc2d1d0fceddd89>[image: Edit]<http://login02.chillifire.net/phpmyadmin/tbl_change.php?db=radius&table=radcheck&where_clause=%60radcheck%60.%60id%60+%3D+572098&clause_is_unique=1&sql_query=SELECT+%2A++FROM+%60radcheck%60+WHERE+%60UserName%60+LIKE+%27lapzel14%27&goto=sql.php&token=df845dec99ab8224acc2d1d0fceddd89>[image: Delete]<http://login02.chillifire.net/phpmyadmin/sql.php?db=radius&table=radcheck&sql_query=DELETE+FROM+%60radius%60.%60radcheck%60+WHERE+%60radcheck%60.%60id%60+%3D+572098&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Dradius%26table%3Dradcheck%26sql_query%3DSELECT%2B%252A%2B%2BFROM%2B%2560radcheck%2560%2BWHERE%2B%2560UserName%2560%2BLIKE%2B%2527lapzel14%2527%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dsql.php%253Fdb%253Dradius%2526amp%253Btable%253Dradcheck%2526amp%253Btoken%253Ddf845dec99ab8224acc2d1d0fceddd89%2526amp%253Bsql_query%253DSELECT%252B%25252A%252B%252BFROM%252B%252560radcheck%252560%252BWHERE%252B%252560UserName%252560%252BLIKE%252B%252527lapzel14%252527%26token%3Ddf845dec99ab8224acc2d1d0fceddd89&token=df845dec99ab8224acc2d1d0fceddd89> 572098lapzel14User-Password:=loxdas[image: Edit]<http://login02.chillifire.net/phpmyadmin/tbl_change.php?db=radius&table=radcheck&where_clause=%60radcheck%60.%60id%60+%3D+572102&clause_is_unique=1&sql_query=SELECT+%2A++FROM+%60radcheck%60+WHERE+%60UserName%60+LIKE+%27lapzel14%27&goto=sql.php&token=df845dec99ab8224acc2d1d0fceddd89>[image: Delete]<http://login02.chillifire.net/phpmyadmin/sql.php?db=radius&table=radcheck&sql_query=DELETE+FROM+%60radius%60.%60radcheck%60+WHERE+%60radcheck%60.%60id%60+%3D+572102&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Dradius%26table%3Dradcheck%26sql_query%3DSELECT%2B%252A%2B%2BFROM%2B%2560radcheck%2560%2BWHERE%2B%2560UserName%2560%2BLIKE%2B%2527lapzel14%2527%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dsql.php%253Fdb%253Dradius%2526amp%253Btable%253Dradcheck%2526amp%253Btoken%253Ddf845dec99ab8224acc2d1d0fceddd89%2526amp%253Bsql_query%253DSELECT%252B%25252A%252B%252BFROM%252B%252560radcheck%252560%252BWHERE%252B%252560UserName%252560%252BLIKE%252B%252527lapzel14%252527%26token%3Ddf845dec99ab8224acc2d1d0fceddd89&token=df845dec99ab8224acc2d1d0fceddd89> 572102lapzel14Expiration:=1311932528[image: Edit]<http://login02.chillifire.net/phpmyadmin/tbl_change.php?db=radius&table=radcheck&where_clause=%60radcheck%60.%60id%60+%3D+572106&clause_is_unique=1&sql_query=SELECT+%2A++FROM+%60radcheck%60+WHERE+%60UserName%60+LIKE+%27lapzel14%27&goto=sql.php&token=df845dec99ab8224acc2d1d0fceddd89>[image: Delete]<http://login02.chillifire.net/phpmyadmin/sql.php?db=radius&table=radcheck&sql_query=DELETE+FROM+%60radius%60.%60radcheck%60+WHERE+%60radcheck%60.%60id%60+%3D+572106&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Dradius%26table%3Dradcheck%26sql_query%3DSELECT%2B%252A%2B%2BFROM%2B%2560radcheck%2560%2BWHERE%2B%2560UserName%2560%2BLIKE%2B%2527lapzel14%2527%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dsql.php%253Fdb%253Dradius%2526amp%253Btable%253Dradcheck%2526amp%253Btoken%253Ddf845dec99ab8224acc2d1d0fceddd89%2526amp%253Bsql_query%253DSELECT%252B%25252A%252B%252BFROM%252B%252560radcheck%252560%252BWHERE%252B%252560UserName%252560%252BLIKE%252B%252527lapzel14%252527%26token%3Ddf845dec99ab8224acc2d1d0fceddd89&token=df845dec99ab8224acc2d1d0fceddd89> 572106lapzel14Simultaneous-Use:=1[image: Edit]<http://login02.chillifire.net/phpmyadmin/tbl_change.php?db=radius&table=radcheck&where_clause=%60radcheck%60.%60id%60+%3D+572110&clause_is_unique=1&sql_query=SELECT+%2A++FROM+%60radcheck%60+WHERE+%60UserName%60+LIKE+%27lapzel14%27&goto=sql.php&token=df845dec99ab8224acc2d1d0fceddd89>[image: Delete]<http://login02.chillifire.net/phpmyadmin/sql.php?db=radius&table=radcheck&sql_query=DELETE+FROM+%60radius%60.%60radcheck%60+WHERE+%60radcheck%60.%60id%60+%3D+572110&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Dradius%26table%3Dradcheck%26sql_query%3DSELECT%2B%252A%2B%2BFROM%2B%2560radcheck%2560%2BWHERE%2B%2560UserName%2560%2BLIKE%2B%2527lapzel14%2527%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dsql.php%253Fdb%253Dradius%2526amp%253Btable%253Dradcheck%2526amp%253Btoken%253Ddf845dec99ab8224acc2d1d0fceddd89%2526amp%253Bsql_query%253DSELECT%252B%25252A%252B%252BFROM%252B%252560radcheck%252560%252BWHERE%252B%252560UserName%252560%252BLIKE%252B%252527lapzel14%252527%26token%3Ddf845dec99ab8224acc2d1d0fceddd89&token=df845dec99ab8224acc2d1d0fceddd89> 572110lapzel14Max-All-Total:=6000000000
On Sun, Jun 5, 2011 at 1:22 AM, Hanno Schupp <hanno.schupp@gmail.com> wrote:
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-Octe.... 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.
Sqlcounter also wraps at 4GB in its reply. Your "6GB" is actually 5722.045 MB, then wraps at 4GB so 1,7GB left and this is replied ;-) As far as I know there's no integrated solution to this unless you change the source code. Most people solve this by using rlm_perl if I'm not mistaking. Make your perl calculate and reply gigawords + remaining bytes when values are >4GB Ps Make sure your coova-chilli is equal or >1.0.13, else it won't understand gigawords replies Kind regards, Y.
Thank you for this reply. I thought the limitation might come from the wrapping around 4.3 GB due to the limitations of a 32bit system with 2147483648 being the highest signed and 4294967296 being the highest unsigned number. 1705032704 is then exactly the difference to 6GB, after the system wrapped at 4.29GB. I requite the log: Sat Jun 4 23:10:21 2011 : Debug: rlm_sqlcounter: Rejected user lapzel14, check_item=1705032704, counter=2147513300 Exactly the 1705032704 one would expect based on highest 32bit unsigned integer. Now here is my problem: Why does it wrap at 32Bit, if the system is a x64 server? Does not make a lot of sense to me. Also, the FAQ is containing instructions how to deal with gigawords in terms of the sql statements that handel the calculation of the counter value. And as this is implemented, the counter value is not the problem here - it is the check_item value that as I understand is based on my configuration, taken straight out of the radcheck table. I am sorry, but this sounds like a limitation/bug of the standard system, that could be overcome. After all, if it can be resolved with custom perl code as I understand you suggest, why should the standard system not be able to handle data limits larger than 4.29GB out of the box? Or am I missing something? Alan, can you enlighten us on this issue? Regards Hanno From: YvesDM [mailto:ydmlog@gmail.com] Sent: Monday, 6 June 2011 5:42 a.m. To: FreeRadius users mailing list Subject: Re: Problem with rml_sqlcounter with GigaByte datavolume On Sun, Jun 5, 2011 at 1:22 AM, Hanno Schupp <hanno.schupp@gmail.com> wrote: 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-Octe ts+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. Sqlcounter also wraps at 4GB in its reply. Your "6GB" is actually 5722.045 MB, then wraps at 4GB so 1,7GB left and this is replied ;-) As far as I know there's no integrated solution to this unless you change the source code. Most people solve this by using rlm_perl if I'm not mistaking. Make your perl calculate and reply gigawords + remaining bytes when values are >4GB Ps Make sure your coova-chilli is equal or >1.0.13, else it won't understand gigawords replies Kind regards, Y.
On Mon, Jun 6, 2011 at 1:24 PM, Hanno Schupp <hanno.schupp@gmail.com> wrote:
Thank you for this reply.
I thought the limitation might come from the wrapping around 4.3 GB due to the limitations of a 32bit system with 2147483648 being the highest signed and 4294967296 being the highest unsigned number. 1705032704 is then exactly the difference to 6GB, after the system wrapped at 4.29GB. I requite the log:
Sat Jun 4 23:10:21 2011 : Debug: rlm_sqlcounter: Rejected user lapzel14, check_item=1705032704, counter=2147513300
Exactly the 1705032704 one would expect based on highest 32bit unsigned integer.
Now here is my problem: Why does it wrap at 32Bit, if the system is a x64 server? Does not make a lot of sense to me.
Also, the FAQ is containing instructions how to deal with gigawords in terms of the sql statements that handel the calculation of the counter value. And as this is implemented, the counter value is not the problem here – it is the check_item value that as I understand is based on my configuration, taken straight out of the radcheck table.
I am sorry, but this sounds like a limitation/bug of the standard system, that could be overcome. After all, if it can be resolved with custom perl code as I understand you suggest, why should the standard system not be able to handle data limits larger than 4.29GB out of the box?
Or am I missing something?
Alan, can you enlighten us on this issue?
Regards
Hanno
You confuse gigawords storage in the database coming from acct updates/stop packets of the nas with the reply from sqlcounter. FR is capable of saving gigawords in the database when a nas is sending them, that's not the problem. But, the sqlcounter's code was never changed to reply gigawords to the nas. Check the C code and you will see. Kind regards Y.
Hanno, I'am facing with the same problem than you. Did you finally find a solution ? If yes, could you please tell me what you have done to fix the problem ? Many thanks Nicolas -- View this message in context: http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-Gig... Sent from the FreeRadius - User mailing list archive at Nabble.com.
On 9 Sep 2011, at 19:08, nfourel wrote:
Hanno,
I'am facing with the same problem than you. Did you finally find a solution ? If yes, could you please tell me what you have done to fix the problem ?
Alan added 64bit integers to FreeRADIUS 3.x.x after the original query. Why don't you test it? -Arran Arran Cudbard-Bell a.cudbardb@freeradius.org RADIUS - Waging war on ignorance and apathy one Access-Challenge at a time.
Thanks for your reply but I can't find any version 3.x.x of freeRADIUS. Where can I find it ? Nicolas -- View this message in context: http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-Gig... Sent from the FreeRadius - User mailing list archive at Nabble.com.
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 a.cudbardb@freeradius.org RADIUS - Waging war on ignorance and apathy one Access-Challenge at a time.
Many thanks, I am going to try it ! Nicolas -- View this message in context: http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-Gig... Sent from the FreeRadius - User mailing list archive at Nabble.com.
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 foo@bar.com, 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: foo@bar.com Max-Input-Octets := 107374182400 Did I miss a thing ? Many thanks Nicolas -----Message d'origine----- De : freeradius-users-bounces+nicolas.fourel=adipsys.com@lists.freeradius.org [mailto:freeradius-users-bounces+nicolas.fourel=adipsys.com@lists.freeradius .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 a.cudbardb@freeradius.org 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
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 <nicolas.fourel@adipsys.com
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 foo@bar.com, 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: foo@bar.com Max-Input-Octets := 107374182400
Did I miss a thing ?
Many thanks
Nicolas
-----Message d'origine----- De : freeradius-users-bounces+nicolas.fourel=adipsys.com@lists.freeradius.org [mailto:freeradius-users-bounces+nicolas.fourel =adipsys.com@lists.freeradius .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 ?
3.x.x is currently in development on the master branch.
-Arran
Arran Cudbard-Bell a.cudbardb@freeradius.org
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
Hi, Here is the result of the SQL Query : SELECT SUM(AcctInputOctets) FROM radacct WHERE UserName='foo@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@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@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@bar.com Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : sql_set_user escaped user --> 'foo@bar.com' Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : expand: SELECT SUM(AcctInputOctets) FROM radacct WHERE UserName='foo@bar.com' -> SELECT SUM(AcctInputOctets) FROM radacct WHERE UserName='foo@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@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@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@bar.com, check_item=0, counter=68882 Any idea ? Thanks for your help Nicolas De : Suman Dash [via FreeRadius] [mailto:ml-node+s1045715n4799383h91@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-Gig... 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-Gig... Sent from the FreeRadius - User mailing list archive at Nabble.com.
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]<http://user/SendEmail.jtp?type=node&node=4801856&i=0> ';****
** **
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]<http://user/SendEmail.jtp?type=node&node=4801856&i=1> '****
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]<http://user/SendEmail.jtp?type=node&node=4801856&i=2> '}'****
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]<http://user/SendEmail.jtp?type=node&node=4801856&i=3> ****
Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : sql_set_user escaped user --> '[hidden email]<http://user/SendEmail.jtp?type=node&node=4801856&i=4> '****
Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : expand: SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email]<http://user/SendEmail.jtp?type=node&node=4801856&i=5>' -> SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email]<http://user/SendEmail.jtp?type=node&node=4801856&i=6> '****
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]<http://user/SendEmail.jtp?type=node&node=4801856&i=7> '****
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]<http://user/SendEmail.jtp?type=node&node=4801856&i=8>'} -> 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] <http://user/SendEmail.jtp?type=node&node=4801856&i=9>, check_item=0, counter=68882****
** **
Any idea ?****
** **
Thanks for your help****
** **
Nicolas****
** **
*De :* Suman Dash [via FreeRadius] [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=4801856&i=10>]
*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]<http://user/SendEmail.jtp?type=node&node=4799383&i=0>> 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] <http://user/SendEmail.jtp?type=node&node=4799383&i=1>,
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] <http://user/SendEmail.jtp?type=node&node=4799383&i=2> Max-Input-Octets :=
107374182400
Did I miss a thing ?
Many thanks
Nicolas
-----Message d'origine----- De : freeradius-users-bounces+nicolas.fourel=[hidden email]<http://user/SendEmail.jtp?type=node&node=4799383&i=3> [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=4799383&i=4> =[hidden email] <http://user/SendEmail.jtp?type=node&node=4799383&i=5>
.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<http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-GigaByte-datavolume-tp4455164p4801856.html>
Sent from the FreeRadius - User mailing list archive<http://freeradius.1045715.n5.nabble.com/FreeRadius-User-f2740693.html>at Nabble.com.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
The « check_item=0 » is reason why I posted my messages on this ML. If I put a value lesser than 2^32 (for example 1000000) for “Max-Input-Octets” in radcheck for username ‘foo@bar.com’, everything is ok, check_item has the good value. If I put value bigger than 2^32, check_item is always equal to 0. Any idea ? Thanks Nicolas De : Suman Dash [via FreeRadius] [mailto:ml-node+s1045715n4801896h94@n5.nabble.com] Envoyé : mercredi 14 septembre 2011 09:43 À : nfourel Objet : Re: Problem with rml_sqlcounter with GigaByte datavolume check_item=0 , See why Max-Input-Octets is returned as 0 . On Wed, Sep 14, 2011 at 12:55 PM, nfourel <[hidden email]> wrote: Hi, Here is the result of the SQL Query : SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=0> '; 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] <http://user/SendEmail.jtp?type=node&node=4801856&i=1> ' 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] <http://user/SendEmail.jtp?type=node&node=4801856&i=2> '}' 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] <http://user/SendEmail.jtp?type=node&node=4801856&i=3> Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : sql_set_user escaped user --> '[hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=4> ' Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : expand: SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=5> ' -> SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=6> ' 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] <http://user/SendEmail.jtp?type=node&node=4801856&i=7> ' 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] <http://user/SendEmail.jtp?type=node&node=4801856&i=8> '} -> 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] <http://user/SendEmail.jtp?type=node&node=4801856&i=9> , check_item=0, counter=68882 Any idea ? Thanks for your help Nicolas De : Suman Dash [via FreeRadius] [mailto:[hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=10> ] 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] <http://user/SendEmail.jtp?type=node&node=4799383&i=0> > 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] <http://user/SendEmail.jtp?type=node&node=4799383&i=1> , 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] <http://user/SendEmail.jtp?type=node&node=4799383&i=2> Max-Input-Octets := 107374182400 Did I miss a thing ? Many thanks Nicolas -----Message d'origine----- De : freeradius-users-bounces+nicolas.fourel=[hidden email] <http://user/SendEmail.jtp?type=node&node=4799383&i=3> [mailto:[hidden email] <http://user/SendEmail.jtp?type=node&node=4799383&i=4> =[hidden email] <http://user/SendEmail.jtp?type=node&node=4799383&i=5> .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 <http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-GigaByte-datavolume-tp4455164p4801856.html> Sent from the FreeRadius - User mailing list archive <http://freeradius.1045715.n5.nabble.com/FreeRadius-User-f2740693.html> at Nabble.com. - 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-Gig... 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-Gig... Sent from the FreeRadius - User mailing list archive at Nabble.com.
I have a working setup which takes Check-Item over 100GB But being a 32Bit counter is wraps in 2GB limit. I have not tried Integer64. Can you check what happens when you change it to 32bit in dictionary instead of declaring it as 64bit ? On Wed, Sep 14, 2011 at 5:53 PM, nfourel <nicolas.fourel@adipsys.com> wrote:
The « check_item=0 » is reason why I posted my messages on this ML. If I put a value lesser than 2^32 (for example 1000000) for “Max-Input-Octets” in radcheck for username ‘[hidden email]<http://user/SendEmail.jtp?type=node&node=4802561&i=0>’, everything is ok, check_item has the good value. If I put value bigger than 2^32, check_item is always equal to 0.****
** **
Any idea ?****
** **
Thanks****
** **
Nicolas****
** **
*De :* Suman Dash [via FreeRadius] [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=4802561&i=1>]
*Envoyé :* mercredi 14 septembre 2011 09:43
*À :* nfourel *Objet :* Re: Problem with rml_sqlcounter with GigaByte datavolume****
** **
check_item=0 , See why Max-Input-Octets is returned as 0 .****
On Wed, Sep 14, 2011 at 12:55 PM, nfourel <[hidden email]<http://user/SendEmail.jtp?type=node&node=4801896&i=0>> wrote:****
Hi,****
****
Here is the result of the SQL Query :****
****
SELECT SUM(AcctInputOctets) FROM radacct WHERE click here. ****
------------------------------ View this message in context: RE: Problem with rml_sqlcounter with GigaByte datavolume<http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-GigaByte-datavolume-tp4455164p4802561.html> Sent from the FreeRadius - User mailing list archive<http://freeradius.1045715.n5.nabble.com/FreeRadius-User-f2740693.html>at Nabble.com.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I have the same result with integer rather than integer64. I tried on a 32 bit server, and indeed, if I put a value bigger than 2^32 octets in Max-Input-Octets check-item, it wraps to 4294967295 octets and not to zero. So the problem seems to be with 64bit architecture and value bigger than 2^32 octets (like 100GB). Very strange behavior. Nicolas De : Suman Dash [via FreeRadius] [mailto:ml-node+s1045715n4802642h20@n5.nabble.com] Envoyé : mercredi 14 septembre 2011 14:53 À : nfourel Objet : Re: Problem with rml_sqlcounter with GigaByte datavolume I have a working setup which takes Check-Item over 100GB But being a 32Bit counter is wraps in 2GB limit. I have not tried Integer64. Can you check what happens when you change it to 32bit in dictionary instead of declaring it as 64bit ? On Wed, Sep 14, 2011 at 5:53 PM, nfourel <[hidden email]> wrote: The « check_item=0 » is reason why I posted my messages on this ML. If I put a value lesser than 2^32 (for example 1000000) for “Max-Input-Octets” in radcheck for username ‘[hidden email] <http://user/SendEmail.jtp?type=node&node=4802561&i=0> ’, everything is ok, check_item has the good value. If I put value bigger than 2^32, check_item is always equal to 0. Any idea ? Thanks Nicolas De : Suman Dash [via FreeRadius] [mailto:[hidden email] <http://user/SendEmail.jtp?type=node&node=4802561&i=1> ] Envoyé : mercredi 14 septembre 2011 09:43 À : nfourel Objet : Re: Problem with rml_sqlcounter with GigaByte datavolume check_item=0 , See why Max-Input-Octets is returned as 0 . On Wed, Sep 14, 2011 at 12:55 PM, nfourel <[hidden email] <http://user/SendEmail.jtp?type=node&node=4801896&i=0> > wrote: Hi, Here is the result of the SQL Query : SELECT SUM(AcctInputOctets) FROM radacct WHERE click here. _____ View this message in context: RE: Problem with rml_sqlcounter with GigaByte datavolume <http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-GigaByte-datavolume-tp4455164p4802561.html> Sent from the FreeRadius - User mailing list archive <http://freeradius.1045715.n5.nabble.com/FreeRadius-User-f2740693.html> at Nabble.com. - 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-Gig... 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-Gig... Sent from the FreeRadius - User mailing list archive at Nabble.com.
It is a matter which needs attention of Alan or Arran. Kindly send a Bug Report so that this situation can be evaluated by the developers. On Wed, Sep 14, 2011 at 6:29 PM, nfourel <nicolas.fourel@adipsys.com> wrote:
I have the same result with integer rather than integer64. I tried on a 32 bit server, and indeed, if I put a value bigger than 2^32 octets in Max-Input-Octets check-item, it wraps to 4294967295 octets and not to zero. So the problem seems to be with 64bit architecture and value bigger than 2^32 octets (like 100GB). Very strange behavior.****
** **
Nicolas****
** **
*De :* Suman Dash [via FreeRadius] [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=4802672&i=0>]
*Envoyé :* mercredi 14 septembre 2011 14:53
*À :* nfourel *Objet :* Re: Problem with rml_sqlcounter with GigaByte datavolume****
** **
I have a working setup which takes Check-Item over 100GB But being a 32Bit counter is wraps in 2GB limit. I have not tried Integer64. Can you check what happens when you change it to 32bit in dictionary instead of declaring it as 64bit ?
****
On Wed, Sep 14, 2011 at 5:53 PM, nfourel <[hidden email]<http://user/SendEmail.jtp?type=node&node=4802642&i=0>> wrote:****
The « check_item=0 » is reason why I posted my messages on this ML. If I put a value lesser than 2^32 (for example 1000000) for “Max-Input-Octets” in radcheck for username ‘click here. ****
------------------------------ View this message in context: RE: Problem with rml_sqlcounter with GigaByte datavolume<http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-GigaByte-datavolume-tp4455164p4802672.html> Sent from the FreeRadius - User mailing list archive<http://freeradius.1045715.n5.nabble.com/FreeRadius-User-f2740693.html>at Nabble.com.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
nfourel wrote:
I have the same result with integer rather than integer64. I tried on a 32 bit server, and indeed, if I put a value bigger than 2^32 octets in Max-Input-Octets check-item, it wraps to 4294967295 octets and not to zero. So the problem seems to be with 64bit architecture and value bigger than 2^32 octets (like 100GB). Very strange behavior.
The sqlcounter module uses 32-bit integers in it's source code. Changing that to 64-bit integers would help. That requires source code patches. Alan DeKok.
participants (7)
-
Alan DeKok -
Arran Cudbard-Bell -
Hanno Schupp -
nfourel -
Nicolas FOUREL -
Suman Dash -
YvesDM