[asterisk-users] cdr-custom/Master.csv rotation

Atis Lezdins atis at iq-labs.net
Sun Jun 15 05:50:29 CDT 2008


On Sun, Jun 15, 2008 at 10:23 AM, Tzafrir Cohen
<tzafrir.cohen at xorcom.com> wrote:
> On Sat, Jun 14, 2008 at 08:49:04PM -0700, Darryl Dunkin wrote:
>> It's like asking for directions, and someone tells you to drive,
>> useless.
>>
>> Here is what we do here:
>> Create /etc/logrotate.d/asterisk:
>> /var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
>> /var/log/asterisk/debug /var/log/asterisk/queue_log {
>>     daily
>>     rotate 7
>>     compress
>>     missingok
>>     notifempty
>>     sharedscripts
>>     postrotate
>>         /usr/local/bin/log_rot_ast
>>     endscript
>> }
>>
>> /usr/local/bin/log_rot_ast contains:
>> #!/bin/sh
>> /usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
>
> "logger reload" rotates logs. But not CSV . That's because the CSV CDR
> files are not held open.

If they are not held open, you can can just move them away with "mv",
next CDR should just write new file.

Regards
A,tis



-- 
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835



More information about the asterisk-users mailing list