On 1/8/07, lenz <[EMAIL PROTECTED]> wrote:
You know that if you rename an open Unix file, it will stay open - i.e. if you rename the logfile "full" to "full.1", Asterisk will continue writing to "full.1" thinking it was "full". The "logger rotate" command forces all log files to be closed and reopened with their canonical names, so your file is actually rotated. Hope this helps l.
CORRECT about UNIX files, INCORRECT about "logger rotate" command. CORRECTION: "logger rotate" does: 1. Closes the files 2. Renames them (actually rotating them) 3. Reopnes the canonical named files "logger reload" does effectively work as you described: 1. Closes files 2. Reopens canonical named files This is the command that should be used with logrotate, for example. EXAMPLE: (consider asterisk running and writing to messages file) # cd /var/log/asterisk # mv messages messages.old (asterisk still running and now writing to messages.old) (there is no file named messages) # /usr/sbin/asterisk -rx "logger reload" (asterisk closed messages.old and created a new messages file) Hope this is clear enough as its really late now... Please correct me if I'm wrong Cheers -- Ex Vito _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
