SV: [asterisk-users] Manage 'full' log file

jan.sarin at securia.se jan.sarin at securia.se
Mon Jan 8 05:22:55 MST 2007


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


More information about the asterisk-users mailing list