Accounting and Acct-Delay-Time in MySQL

Alan DeKok aland at deployingradius.com
Wed Nov 17 17:10:03 CET 2010


Stefan Winter wrote:
> the default queries for mysql log Acct-Delay-Time into the columns  
> acctstartdelay and acctstopdelay, respectively. They leave the
> timestamps for acctstarttime and acctstoptime at %S. For a non-zero
> delay, this means that a database reader needs to do math to get the
> start and stop times.

  Yes.  There have been discussions about fixing that, and other
accounting issues.

> It is rather unintuitive that a database user needs to calculate the
> *actual* event times manually by substracting the values. This is
> something that MySQL can easily do on its own at INSERT or UPDATE.

  Yes.

> Is there a specific reason why the two are kept separate? If not, I'll
> merrily volunteer to update the default query set to do so; I'll do this
> for my deployment's custom queries anyway. This would also make the two
> columns for delay time obsolete.
> 
> Any thoughts on this?

  I'd re-visit the entire accounting table && queries.  Create a *new*
table, so that people don't have surprises when they upgrade.

  Ideally, it should be robust in the face of duplicate packets, and
packets forwarded via 2 different paths (think radrelay + delays)

  Alan DeKok.



More information about the Freeradius-Users mailing list