Configuring rlm_counter for gigaword

Jeff Wark jwark at
Wed Jul 18 14:07:54 CEST 2012

I'm not sure what rlm_counter is, but the documentation for regular 
accounting states:

Modify FreeRADIUS Queries

Secondly, modify the accounting queries in sql.conf to make the SQL 
database perform the computation that is required to merge the two 
values sent as attributes by the NAS into one single 64-bit integer 
stored in the database.

All occurences of '%{Acct-Input-Octets}' need to be replaced with:
'%{Acct-Input-Gigawords:-0}' << 32 | '%{Acct-Input-Octets:-0}'

The same thing needs to be done for '%{Acct-Output-Octets}':
'%{Acct-Output-Gigawords:-0}' << 32 | '%{Acct-Output-Octets:-0}'

Found at

Also, the database table must be able to hold the larger values.

On 7/17/2012 10:59 PM, jobhunts02 at wrote:
> I want to use the Acct-Output-Gigawords attribute along with the Acct-Output-Octets to keep track of traffic in an rlm_counter that can exceed the 32-bit integer limitation. It looks like the counter will take only one count-attribute.  How can I use both of these attributes in a single counter?
> -
> List info/subscribe/unsubscribe? See

More information about the Freeradius-Users mailing list