Leo Burd
2005-Jul-05 09:28 UTC
[Asterisk-Users] How to prevent log files from eating my hard drive?
Hello there, Somehow, Asterisk log files are consuming all the space that I have in my hard disk... They've already eaten 14GB and are still hungry!! What shall I do? I'm not even logging anything in verbose mode!! Help really appreciated!! Best, Leo
Carlos Alperin
2005-Jul-05 10:37 UTC
[Asterisk-Users] How to prevent log files from eating my hard drive?
Are you debugging something or you are AT&T? -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Leo Burd Sent: Tuesday, July 05, 2005 12:28 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] How to prevent log files from eating my hard drive? Hello there, Somehow, Asterisk log files are consuming all the space that I have in my hard disk... They've already eaten 14GB and are still hungry!! What shall I do? I'm not even logging anything in verbose mode!! Help really appreciated!! Best, Leo _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Samy Antoun
2005-Jul-05 10:55 UTC
[Asterisk-Users] How to prevent log files from eating my hard drive?
> Somehow, Asterisk log files are consuming all the > space that I have in > my hard disk... They've already eaten 14GB and are > still hungry!! What > shall I do? I'm not even logging anything in > verbose mode!!Leo, This can be done through editing of /etc/logrotate.d/asterisk. This file contains a script of log rotation. This is a sample file: /var/log/asterisk/*log { missingok rotate 5 weekly create 0640 asterisk asterisk postrotate /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null endscript } As you can see, the "rotate 5" means that it will keep 5 old files, you can reduce that number to 2 or 3 to save some space. Another thing you can do to save a LOT of space is to change "weekly" to "daily", this way you will keep only ONE DAY of logging data in the file. Third thing you can do is to add "compress" statement to the script, this will compress the old files. I think if you'll combine those 3 options, you going to have a log files that is almost 10% of what you have now. Regards. Samy ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com
Rich Adamson
2005-Jul-05 13:01 UTC
[Asterisk-Users] How to prevent log files from eating my hard drive?
> Somehow, Asterisk log files are consuming all the space that I have in > my hard disk... They've already eaten 14GB and are still hungry!! What > shall I do? I'm not even logging anything in verbose mode!! > > Help really appreciated!!Try this... cd /var/log/asterisk ls -al you should see something like this: drwxr-xr-x 2 root root 4096 Jul 1 13:32 cdr-csv drwxr-xr-x 2 root root 4096 May 6 10:24 cdr-custom -rw-r--r-- 1 root root 64674 Jun 1 06:55 debug -rw-r--r-- 1 root root 0 May 6 10:15 event_log -rw-r--r-- 1 root root 341834 Jul 5 13:50 messages -rw-r--r-- 1 root root 5928 Jul 4 18:34 queue_log What are the sizes of those files? If you see the debug file as being large, then look at /etc/asterisk/logger.conf; you should see something like this: console => notice,warning,error messages => notice,warning,error ;,debug If the messages => line has the debug statement in it, then comment it out like above and stop restart astersik. If other log files are large, then post what you have so we have a clue what you doing.
Michael Stahl
2005-Jul-05 13:04 UTC
[Asterisk-Users] How to prevent log files from eating my hard drive?
Use a script to rotate the logs every night (by cron). If you need one, I'll post what I have. That's only have the solution of course...you would have to write another script to delete logs > X days old. Anyone have one of those handy? -----Original Message----- From: Leo Burd [mailto:leob@media.mit.edu] Sent: Tuesday, July 05, 2005 12:28 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] How to prevent log files from eating my hard drive? Hello there, Somehow, Asterisk log files are consuming all the space that I have in my hard disk... They've already eaten 14GB and are still hungry!! What shall I do? I'm not even logging anything in verbose mode!! Help really appreciated!! Best, Leo