Re: Radius Accounting Logs

Sverre Hjelm (hjelms@norway.eu.net)
Thu, 24 Apr 1997 17:16:49 +0100

Christian,

>I already wrote a C++ program that parses Radius logs and converts them
>into usage Logs. I'm trying to eliminate errors by detecting 'Login without
>Logout' and 'Logout without Login'

You can't trust the accounting packets to be logged in sequence. Delay in
the net, etc. could very well cause the start record of session 2 to
be logged before the stop record of session 1, not to mention having
the stop record of session 1 beeing logged before the start record of
session one (for very short session).

The thing to do is to scan all the logs sequencially, and do something like
this:
- Does is match a record of the other type?
- Yes: we have a pair. Does the times match apx?
- Yes: save to disk.
- No: dump.
- No: save in memory as a pending record.

Sverre