SV: [asterisk-users] Manage 'full' log file
Mailinglisten
mailinglisten at tdb-mv.de
Mon Jan 8 06:10:55 MST 2007
jan.sarin at securia.se schrieb:
> Thanks for the quick response!
>
> I read about logrotate at voip-info.org but I didn't quite understand it. I'm no asterisk/linux expert unfortunately.
>
> First of all. What exactly does happen when I run:
> /usr/sbin/asterisk -rx 'logger rotate'
>
> Does it clear the file and create a new one? Can I run this manually without any interruption in the system?
>
> And what does the script do? I understand it "rotates" the logs. But does it delete the old files? Where do I put the script? How do I run it? As you can see I'm really a newbie on this. Unfortunately the docs for asterisk are often with the expectation that you know everything... :)
>
> Regards,
> Jan
>
> -----Ursprungligt meddelande-----
> Från: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] För Ex Vitorino
> Skickat: den 8 januari 2007 13:10
> Till: Asterisk Users Mailing List - Non-Commercial Discussion
> Ämne: Re: [asterisk-users] Manage 'full' log file
>
> We've been using logrotate without any issue... We're using
> the below quoted configuration. Notice the invocation of
> Asterisk's CLI "logger reload" command so as to close the
> old files and open new ones.
>
> Cheers,
> --
> Ex Vito
>
>
> /var/log/asterisk/messages /var/log/asterisk/queue_log /var/log/asterisk/event_log {
> weekly
> rotate 52
> dateext
> compress
> delaycompress
> nocreate
> missingok
> sharedscripts
> postrotate
> /usr/sbin/asterisk -rx "logger reload"
> endscript
> }
> _______________________________________________
> --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
> _______________________________________________
> --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
>
>
This script goes into /etc/logrotate.d in a seperate file. It will
compress the log weekly and store it in the same directory the original
log was in.
-- F. Foerster
More information about the asterisk-users
mailing list