This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tail -f will not work with IIS generated log files

Re: "Re: tail -f will not work with IIS generated log files"

Well, the subject says it all. And the reason Robert C. gives (IIS
pre-allocates a lot of  buffer-space at the end of it's logs) would also
explain why I get these odd errors:
  tail: ex020925.log: file truncated
 $ tail -f ex020926.log|grep -i ''
 Binary file (standard input) matches

Bit of bummer because getting "tail" to monitor IIS was the VERY reason I
downloaded and installed .  I'm wondering:

 1) When might someone fix this? (extend "tail" to deal with the IIS log
tricks, and thus making a more powerful "tail")  tail doesn't display so is
surely stripping out pre-allocated buffer space at the end (perhaps because,
in MS-DOS, it's preceded by a ^Z), but not going back to see if that space
it skipped has changed, or just not noticing any changes because , as Robert
suggested, it's probably just looking at the size of the file. What it
probably should be looking at first is the mod-date, and when that changes,
continue outputting it's output at the point where it found no more valid
text, NOT necessarily the end of the file.  This minor redesign could then
be folded back into the Gnu sources, for a more powerful tail for everyone.
It's certainly imaginable that other logs might pre-allocate end buffer
space to ensure fast writes. 

 2) What's the workaround?  Implementing "tail -f" via "less" or "Perl" (as
s=libfile-tail-perl and  In particular, 
what are people doing in the meantime to monitor their IIS logs?

Thanks, -Mike Parker
  High-Tech?  Romantic?  Making a difference?  --Want some good tips &
secrets?  See this month's 

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]