|Perl Monk, Perl Meditation|
Re^3: Tail'ing a log that frequently rolls overby BrowserUk (Pope)
|on Jan 12, 2009 at 21:14 UTC||Need Help??|
any form of the "follow" options (e.g., "tail -f", "tail --follow", etc.) it never gives anything
Hm. It's possible you have a newer version that is fundementally broken and nobody has noticed, but I seriously doubt it. It is more likely to be how you are using it. The following two scripts demonstrate that it works:
A simulated high speed, rotating logger:
A tail -F script:
the tail.exe process needs to be maually killed.
Methinks you have unreal expectations. Any version of tail on any platform when used with -F (--follow=name) will have to be explicitly terminated, whether manually or programmically, by some external influence. It could not be any other way.
When following a rotating named file, there will always be a short but real period between the renaming of the old log and the creation of the new one. Sp tail has to be written to ignore any 'file not found' errors from open and retry. There is therefore, no reasonable condition for it to self terminate.
So then it falls to your script to decide when it should terminate. Whether because
If the latter, it will be necessary for you to detect the demise of the log producer in a timely manner, before re-entering the read state.
You appear to be under the impression that tail will be able to know when the program producing the logs isn't going to create another new one, and self-terminate, but that simply cannot be the case.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.