[asterisk-dev] cdr-custom rotate?

John Todd jtodd at digium.com
Wed Aug 13 16:09:52 CDT 2008


At 11:25 AM -0700 2008/8/13, Brian Degenhardt wrote:
>John Todd wrote:
>[snip]
>  > Feature idea:
>>
>>  We have the concept of log rotation in logger.conf.  Why don't we use
>>  the same routines and configuration file syntax for rotating CDR CSV
>>  logs?  Then we could embed the rotation of CSV CDR files into
>>  Asterisk instead of using cron jobs (though cron systems would be
>>  unaffected unless "persistent=yes" was set with our theoretically new
>>  command below.)  "cdr csv rotate" might be the appropriate command.
>>  This would remove yet another external requirement for
>>  platform-specific scripts to operate and manage Asterisk in a
>>  production environment.
>>
>>
>>  In a somewhat unrelated question:
>>
>>    Are the resources consumed by opening/closing the cdr files
>>  excessive in high-volume circumstances?
>
>No, in fact, CEL opens and closes it's log files for every entry.
>
>A quick test on my desktop system takes about 17 seconds to
>open/write/close a million times, and about 6 seconds to
>open/million-writes/close.  I think the difference of 11 microseconds is
>negligible, considering the processing power needed to execute a call,
>even one that's quickly redirected.
>
[snip]


OK, thanks for doing the tests.  Data is good, speculation is bad.  :-)

I'm still a proponent of CDR CSV rotation, though that's a totally 
different question.

JT


-- 
--
John Todd
jtodd at digium.com        +1-256-428-6083
Asterisk Open Source Community Director



More information about the asterisk-dev mailing list