Gigaword support

Stefan Winter stefan.winter at
Tue May 29 09:07:39 CEST 2007


> Have a look at this:

hm, I had a look at this HOWTO, and the FreeRADIUS bits appear a bit odd. He 
adds a new column to radacct, and fills the gigawords attribute into this 
seperate column. This does not give a coherent output: you are likely 
interested in one single number (i.e. the number of input octets), and not in 
doing binary arithmetic yourself on two seperate columns of the table.

I have a few simple suggestions:

- (mysql) modify Schema AcctInputOctets to be BIGINT(20) instead of BIGINT(12)
  [this will make the integer big enough to hold any 64-Bit value]
- modify the default query in sql.conf to do the binary arithmetic (merging
  Gigaword << 32 | inputOctets) into a single number and storing that in

At least for mySQL, this kind of arithmetic in an update or insert query is 
rather simple:


AcctInputOctets = '%{Acct-Input-Octets}',


AcctInputOctets = '%{Acct-Input-Gigawords}' << 32 | '%{Acct-Input-Octets},

and you're done: it gives us 64-bit counter handling for SQL backends with no 
pain (and Output-octets, Input-Packets, Output-Packets equivalently)

Something for 2.0?




Stiftung RESTENA - Réseau Téléinformatique de l'Education Nationale et de 
la Recherche
Ingenieur Forschung & Entwicklung

6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
E-Mail: stefan.winter at     Tel.:     +352 424409-1                Fax:      +352 422473
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the Freeradius-Devel mailing list