[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Michael B. Parker
Subject: Re: tail -f will not work with IIS generated log files
Date: Thu Sep 26 04:01:04 2002

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 www.CyGWin.com .  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
www.google.com/search?q=%22tail+%2Df%22+perl+OR+less)?  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 www.Cytex.com/go/MBParker/Seeking 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]