Radacct table is growing and growing
Matthias Nagel
matthias.h.nagel at gmail.com
Fri Jan 17 09:33:13 CET 2014
Hi,
> that allows freeradius makes authentications with radacct historical
tables?
The table radacct is not used for authentication. Radacct stores accounting
information only. Hence, it is safe to delete old entries in order to free
memory.
> Also I thought in make quarterly tables but this is a proble to
authenticate users.
I do not understand your point. What exactly is the problem?
Here ist what we do: Due to legal right, we are only allowed to store the
accounting information for seven days anyway. Hence I wrote I little SQL
script that is periodically invoked through crontab. In principle the SQL
script performs two steps:
1) For any entry that has an accounting start and an accounting update time
that is older than five times the update intervall but has no accounting
stop time, the accounting stop time is set to the last accounting update
time. Because the update time was not updated recently, we must assume that
the sessions is stalled. I.e. the session has stopped, but we missed the
acct stop message for some reason.
2) Select any row which most recent time entry (any of start, update, stop
time) is older than 7 days and delete that row.
Of course, depending on your SQL server you should pay attention to table
locking, because freeradius still access the database while the script is
running.
Matthias
2014/1/17 Antonio Fernández Pérez <antoniofernandez at fabergames.com>
> Hi everybody,
>
> I have a radacct table with more than 12300000 rows. I have increased RAM
> memory recently because the data base is working with InnoDB engine and was
> necessary to load data into the buffer. But, anybody knows some technique
> that allows freeradius makes authentications with radacct historical tables?
>
> I have thought in grouping rows using the UserName, keeping only one row
> for each user. Also I thought in make quarterly tables but this is a proble
> to authenticate users.
>
> Any ideas?
>
> Thanks in advance.
>
> Regards,
>
> Antonio.
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
--
Matthias Nagel
Parkstraße 27
76131 Karlsruhe
Festnetz: +49-721-96869289
Mobil: +49-151-15998774
e-Mail: matthias.h.nagel at gmail.com
ICQ: 499797758
Skype: nagmat84
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140117/4b24f7fe/attachment.html>
More information about the Freeradius-Users
mailing list