Uptime counters (was RE: [Asterisk-Users] Bayonne and Asterisk)

James Sizemore james at deny.org
Thu Nov 20 23:08:05 MST 2003


What bug # should I look for you patch under? <smile>

Andrew Kohlsmith wrote:

>>You can not rotate logs with out dropping calls,  and if logs get a
>>little over 2Gbs Asterisk will crashes...
>>    
>>
>
>Why not?  Why are the logfiles kept open for the entire life of Asterisk?  
>Hell even my heavily loaded qmail server isn't this braindead in that 
>regard.
>
>If * can be patched to open, write, close for every log write it is trivial 
>to rotate logs:
>
>mv /path/to/logfile /path/to/logfile.old
>while fuser -s /path/to/logfile.old ; do sleep 1 ; done
>bzip2 -1 /path/to/logfile.old
>
>and you're done.  mv does not change the inode, so asterisk does not notice 
>it if it _is_ in the middle of a write, and the fuser do/while loop waits 
>patiently until asterisk is done with the file.  Next time Asterisk tries 
>to open the file it will fail (since it doesn't exist) and will recreate 
>it.  Piece of cake.
>
>Regards,
>Andrew
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
>  
>





More information about the asterisk-users mailing list