[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    Re: problem with mysql accounting
From:       Dennis Skinner <dskinner () bluefrog ! com>
Date:       2006-12-21 18:52:04
Message-ID: 458AD7D4.6090600 () bluefrog ! com
[Download RAW message or body]

basile wrote:
> accounting_start_query = "INSERT into radaact SET\
>                 `User-Name` = '%{User-Name}',\
>                 `Calling-Station-Id` = '%{Calling-Station-Id}',\
>                 `Called-Station-Id` = '%{Called-Station-Id}',\
>                 `NAS-IP-Address` = '%{NAS-IP-Address}',\
>                 `NAS-Port` = %{NAS-Port},\
>                 `Timestamp Start` = NOW(),\
>                 `Acct-Unique-Session-Id` = '%{Acct-Unique-ession-Id}'
>         "

Any particular reason you are using backticks (`) instead of single
quotes (') around the column names?  I'm not sure if they have special
meanings in radius/mysql.

You should also ensure that the Acct-Unique-Session-Id is truly unique
when you UPDATE.  Often NAS's will reuse supposedly unique id's.  Esp if
they are rebooted.  Looking for a Timestamp Start within X hours of
NOW() may help you out there.  Otherwise you may update really old rows
and have sessions that look like they lasted 30 days or something.  We
ran into this problem.

-- 
Dennis Skinner
Systems Administrator
BlueFrog Internet
http://www.bluefrog.com
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic