p.mayers at imperial.ac.uk
Thu Aug 7 12:34:16 CEST 2008
On Thu, Aug 07, 2008 at 11:05:00AM +0100, Jonathan Gazeley wrote:
>We at Bristol have used FreeRADIUS with no problems for some time, but I
>would like to alter the way that accounting is performed, but I am
>unsure of how to do it.
>Currently all the accounting is sent to a MySQL database. The 'radacct'
>table tells me the start/stop of each session and the amount of traffic
>passed in that time. However the traffic figures are only updated when
>the user's session terminates. Is there a way to get up-to-date
>statistics that can be polled, say, on an hourly basis?
Your NAS needs to support interim accounting.
If it does already, it might be as simple as adding:
Acct-Interim-Interval = 1800,
Fall-Through = yes
...to the "users" file; modify as appropriate of course for your config.
The "sql.conf" file will need to have the interim queries defined of
course; the default configs do.
If your NAS doesn't support interim accoutning (some ethernet switches
don't, irritatingly) then you'll need to resort to something like snmp,
netflow or pmacct, and go from ip->mac and then mac (callingstationid)
>What I'm getting at is that I want each user to have a daily/weekly/etc
>traffic quota so the radius server should repeatedly check to see if it
>has been exceeded. Appropriate action will be taken elsewhere is this is
Yeah, we do this. It works very well. If you want to contact me offline
I can give you the details.
More information about the Freeradius-Users