On 1/7/09 2:51 AM, John Summerfield wrote:
I think there exist these problems: 1. Unwritten data held in a buffer may exceed your arbitrary one or two lines. It would be safer to live with that, either ignoring it or programming around it depending on the significance of the log. 2. I was concerned about loss of data, but atm I don't see how it would happen.
Right, I forgot to point that out -- there is a small chance of losing some data...I'm assuming the kernel will pass unwritten-to-disk/buffered data to bzip2, as it is a file that the kernel knows about (duh), but daemon may write lines just after bzip2 has received EOF, but before bash truncates the file -- those would be lost (I guess throwing a `sync' command between the bzip2 and bash file truncation may eliminate loss of data in process I/O buffer but not yet in kernel file buffer?). I made the additional assumption that log files can reasonably be 99.999% saved, since one doesn't inspect 99% of all logs' contents. However, as John points out, one should be aware of potential loss. -- <http://www.ciw.edu/> <http://www-ciwdpb.stanford.edu/> <http://www.arabidopsis.org/>* Larry Ploetz Systems Administrator Carnegie Institution of Washington Department of Plant Biology The Arabidopsis Information Resource 650 325 1521 x 296 la...@tairgroup.org * ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390