In article <[EMAIL PROTECTED]>,
Adrian Marsh <[EMAIL PROTECTED]> 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..
Well if it were a logfile, Asterisk's auto-rotate when it receives a
SIGXFSZ would stop it writing to the huge logfile and so the signals
would stop. In your case they didn't stop, so it must have been another
kind of file.
Deleting a recording that is in progress will hide it from the directory
structure, but the file will still exist and keep growing until the
recording is terminated. In this case, you would not see the file using
"ls", but the free space would keep decreasing as the invisible file
grows. You would see a 2GB drop in disk usage, not when you deleted the
file, but when the (deleted) recording was terminated and the file closed,
e.g. by restarting Asterisk.
You can always use "lsof -p<pid>" to list the open files of an Asterisk
process. If a still-open file has been deleted, it will indicate that
with the comment "(deleted)".
> My logrotate setup is :
>
> [EMAIL PROTECTED] 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
> [EMAIL PROTECTED] 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..
"logger rotate" tells Asterisk to do its own rotation, and Asterisk does
its own rotation if it gets a SIGXFSZ.
"logger reload" as in the logrotate example above just tells Asterisk to
close and re-open its logfiles, since the actual rotation was done by
logrotate instead.
Using logrotate with "logger reload" is just more flexible.
Cheers
Tony
--
Tony Mountifield
Work: [EMAIL PROTECTED] - http://www.softins.co.uk
Play: [EMAIL PROTECTED] - 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