>I am trying to write some custom scripts to read RADIUS accounting logs
>and collect information about line usage and time usage for users. The
>problem I am having is that I assumed that the times in the start and
>stop records were consistent.
>
>I do the following to figure times:
>starttime = Start->Timestamp - Start->Acct-Delay-Time
>endtime = Stop->Timestamp - Stop-Acct-Delay-Time
>
>The problem I am having is that
>endtime - starttime != Stop>Acct-Session-Time
>
>Most of the time, the difference is only a second, but so far I have
>seen differences of 6 to 8 seconds.
>
>Why is this happening? Which time should I trust? I guess the
>"Timestamp" is the same as the time at the top of each record. Is this
>not a reliable time? If not, why not?
AFAIK, the Timestamp is added by the radius server. The Acct-Session-Time
is sent from the PM. My guess is that the 1-8 second delay that you are
seeing is the time that it takes for the request to be processed by
radiusd. I would use the Acct-Session-Time for the accounting.
>--
>Chris Adams - cadams@ro.com
>System Administrator - Renaissance Internet Services
>I don't speak for anybody but myself - that's enough trouble.
>
----------------------------------------------------------------------------
Michael J. Hartwick, VE3SLQ
Hartwick Communications Consulting
hartwick@primeline.net