rotating detail files

Alan DeKok aland at
Fri Jun 17 14:57:55 CEST 2016

On Jun 17, 2016, at 8:50 AM, Jakob Hirsch <jh at> wrote:
> we want to dump all our requests into files, using the detail module.
> The files should be rotated (and archived) with the standard logrotate
> tool, which would need the freeradius daemon to to close and reopen the
> file (automatically or triggered, e.g. by SIGHUP, like the radius.log).
> But I found now way to tell the daemon (or the detail module) to do
> that. As I read from the code, this will only happen when the file is
> unlinked or nothing was written for 30 seconds. gzip will unlink the
> file afterwards, but it will complain about the changed file size during
> compression and there is chance of data loss (as something may be
> written just before the file is deleted).

  Yes.  The changes in v3 which make the detail module more thread-safe and faster do have this side effect.

> I know I can tell the detail module to separate the files by
> hour/day/whatever, but that would require significant changes in the
> subsequent processing, which I want to avoid (at least for now).

  Write files hourly.  Then, have a cron job which concatenates them together in a format required by the later processing.

  Alan DeKok.

More information about the Freeradius-Users mailing list