incorrect radacct AcctSessionTime

Guy Fraser guy at incentre.net
Wed Mar 15 16:23:51 CET 2006


On Tue, 2006-14-03 at 15:16 -0500, Alan DeKok wrote:
> "Gunther" <freeradius at caribsms.com> wrote:
> > From time to time I see entries in the radacct AcctSessionTime column with
> > over 1 billion seconds,
> > despite that the StopTime minus StartTime is less than 5 seconds.
> > With FR 1.0.5 it was a few times 2147483647: 
> 
>   2147483647 is 2^31-1.  It looks like a signed/unsigned problem to
> me.

I used to see Acct-Session-Time responses from USR Hyper Cards 
like that every so often, the NAS was at fault and required a 
reboot.

We would then calculate the time :
Example,
Acct-Session-Time = (Acct-Stop-Time - Acct-Stop-Delay) - 
(Acct-Start-Time + Acct-Start-Delay)

We did it that way to give the customer the benefit of any 
error possibly incurred by delays. How you do this in real
life will depend on what kind of DB you use to store the 
accounting data.

> 
> > Now with 1.1.0 it is around 1142280970:
> 
>   Which is a weird number.
> 
> > I presume that the NAS (wrt54g with Chillispot) is sending the incorrect
> > information ...
> > Is this correct?
> 
>   Maybe.  See the SQL queries.  If the NAS is sending
> Acct-Session-Time, that goes into the column.  If it doesn't send
> Acct-Session-Time, then the session time is calculated based on the
> local system time, and other info.
> 
>   It looks to me like the clocks on your NAS and the RADIUS server may
> be quite a ways off from each other.
> 
>   Alan DeKok.
> - 
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html





More information about the Freeradius-Users mailing list