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

Adrian Marsh Adrian.Marsh at ubiquisys.com
Thu Aug 30 06:17:49 CDT 2007


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..

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]#

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..

Adrian

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Tony
Mountifield
Sent: 30 August 2007 11:35
To: asterisk-users at lists.digium.com
Subject: Re: [asterisk-users] asterisk at 100% CPU, 1000's of log files

In article
<094A73044298734FB7D58CAAA319E1D66AC576 at UBIQ-SERV1.ubiquisys.local>,
Adrian Marsh <Adrian.Marsh at ubiquisys.com> wrote:
> Hi All,
> 
> Twice now in the past few weeks I've walked into the office to find
that
> our 1.2.24 Asterisk process is sat at 100%, and that hundreds of
> thousands of log files in /var/log/asterisk exist, all at 312 bytes,
> containing:
> 
> Aug 29 23:22:17 VERBOSE[24303] logger.c: Asterisk Event Logger
restarted
> Aug 29 23:22:17 VERBOSE[24303] logger.c: Asterisk Queue Logger
restarted
> Aug 29 23:22:17 VERBOSE[24303] logger.c: Rotated Logs Per SIGXFSZ
> (Exceeded file size limit)
> Aug 29 23:22:17 WARNING[24303] format_wav.c: Unable to find our
position
> 
> Stopping/starting A*k seems to reset things ok...

Hi Adrian,

This is a problem I experienced and reported at
http://bugs.digium.com/view.php?id=8360

We never did agree on the best way to overcome it, and the bug got
closed/suspended when I didn't have time to follow up on it.

My guess is that you had a recording running somewhere whose file size
hit
2GB. On a 32-bit system, this generates a SIGXFSZ, which prompts
Asterisk
to rotate the logfiles (without actually checking whether it really was
a
logfile that caused the SIGXFSZ). Since it was caused by something else,
the signal keeps getting generated and the logfiles keep getting
rotated.

On my system, it was Meetme recordings that could cause it. I
sidestepped
the issue by putting a filesize check into Meetme before writing a frame
out to the record file.

Cheers
Tony

-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.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