delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/09/25/23:38:45

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <55BAE1F3AB0DD41198B600508BA241B0043918FA@ehost002.intermedia.net>
From: "Michael B. Parker" <MBParker AT Cytex DOT com>
To: "'CyGWin AT CyGWin DOT com list L20020925pst1457- www.cygwin.com/lists.html'"
<CyGWin AT cygwin DOT com>
Cc: "'Mitchell Balsam'" <MBalsam AT TDI DOT Net>,
"'Robert Cicconetti'"
<RCicconetti AT MDO DOT Net>,
"'Bug-TextUtils AT GNU DOT Org'" <Bug-TextUtils AT GNU DOT Org>
Subject: Re: tail -f will not work with IIS generated log files
Date: Wed, 25 Sep 2002 20:38:47 -0700
MIME-Version: 1.0

Re: "Re: tail -f will not work with IIS generated log files"
(http://www.cygwin.com/ml/cygwin/2000-10/msg01480.html)

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 '192.168.1.1'
 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
http://packages.debian.org/cgi-bin/search_packages.pl?searchon=names&keyword
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 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019