[asterisk-users] asterisk at 100% CPU, 1000's of log files

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Aug 30 07:45:13 CDT 2007


On Thu, Aug 30, 2007 at 12:17:49PM +0100, Adrian Marsh wrote:
> Thanks for the answers Tony/Tzafrir
> 
> I checked the disk usage stats, and they are constant throughout the
> period.  I have a script that runs through on-the-hour to clean out
> recordings >3hours old, and I monitor disk usage via SNMP.
> 
> I wonder though if a log file could also cause this? Maybe the debug
> logfile..  However, again the space "free" stats for the system are
> constant, and I'd be able to see a 2Gb drop when I cleaned the log
> directory..

Do you log verbose and debug?

Do you really need that?

> 
> My logrotate setup is :
> 
> [root at ubiphone log]# grep asterisk /etc/logrotate.d/*
> /etc/logrotate.d/asterisk:/var/log/asterisk/messages
> /var/log/asterisk/debug /var/log/asterisk/*log {
> /etc/logrotate.d/asterisk:       /usr/sbin/asterisk -rx 'logger reload'
> > /dev/null 2> /dev/null
> [root at ubiphone log]#

cat /etc/logrotate.d/asterisk

> 
> Webmin  shows that logrotate (my first suspect) runs at 4:02 AM each
> day, but the CPU rate spiked at 11:25PM, so that doesn't match either..
> 
> 
> Is it "logrotate" or A*k itself that rotates the logs?  I thought it was
> A*k itself..

If you have logrotate, implementing a system-wide rotation policy, I
really don't see a point in rotating logs with Asterisk's logger.

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list