rotating detail files

Jakob Hirsch jh at plonk.de
Fri Jun 17 16:26:57 CEST 2016


A.L.M.Buxey at lboro.ac.uk wrote on 2016-06-17 15:04:
>> we want to dump all our requests into files, using the detail module.
>> The files should be rotated (and archived) with the standard logrotate
> logrotate can handle this - you just need to ensure that you are using the options
> as provided by the latest source code/config files - this will ensure that
> the files are dealt with correctly and the server restarted as you have already
> noted.

which "latest"? 3.0.11 only has "nocreate" in the detail section in
scripts/logrotate/freeradius, no server restart.
Oh, and "copytruncate" (for radius.log) is definitely something we don't
want to use, as it is prone to data loss.

Looking more closely at the code, I wonder why HUP won't close the
detail file(s).
- rlm_detail is marked HUP_SAFE
- on HUP, the instance memory is freed automatically, right? (mod_detach
only frees the hash table)
- exfile_init registers _exfile_free as destructor, so _exfile_free
should be called when the instance is freed
- _exfile_free closes all files

Don't know what I'm missing here...



PS: feel free to move this to freeradius-devel, not really a -users
issue anymore, I guess :)


More information about the Freeradius-Users mailing list