FW: SQLm_counter and 64 bit values

Jonathan Bastin jonathan.bastin at peerpointinternet.co.uk
Mon Jun 25 12:43:15 CEST 2012


I am using Freeradius 2 on Ubuntu 64 bit machine. I am trying to add up the months' worth of data the user has used and make sure they don't go over capacity.

So far I have counter.conf:

sqlcounter monthlydata {
                                counter-name = Total-Octets-Monthly
                                check-name = CS-Total-Octets-Monthly
                                reply-name = menu
                                sqlmod-inst = sql
                                key = User-Name
                                reset = never
                query = "SELECT SUM( AcctInputOctets + AcctOutputOctets) FROM radacct WHERE UserName='%{%k}' AND AcctStartTime > (DATE_SUB(CURDATE(),INTERVAL DAYOFMONTH(CURDATE())DAY))"
}

And in the users I have a check value of CS-Total-Octets-Monthly := 107375000000

The issue I am having is that I get Debug: rlm_sqlcounter: (Check item - counter) is less than zero which I believe is because the sql query returns a value bigger than 32bit and the sql counter module isn't 64 bit counter.


Is anybody able to offer me advise on where to go with this one. I did read this thread but no real fix came out of it http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-GigaByte-datavolume-td4455164.html
-------------------------------------------------------------------------------------------------------------------------- This email (including any attachments) is intended only for the recipient(s) named above. It may contain confidential or privileged information and should not be read, copied or otherwise used by any other person. If you are not the named recipient please contact the sender and delete the email from your system. The author's incumbent expressions, views and thoughts are their own and not necessarily representative of those of the Peer Point Internet Ltd or associated companies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20120625/03d38c29/attachment.html>


More information about the Freeradius-Users mailing list