<p dir="ltr">Well, that's active enough that polling in a timer is likely to return some results each time, with a little tuning of the timer interval. </p>
<p dir="ltr">The notify style methods come into their own when most polls come back empty, and you end up burning cpu just polling empty. </p>
<p dir="ltr">The other trap to be wary of is if the file gets rolled by some other utility. Watching a directory full of moving files is where inotify and similar mechanisms really come into their own. </p>
<p dir="ltr">Finally, an aside: illumos has gained support for Linux compatible inotify via the LX brand work. The module above works in a SmartOS LX zone. I've yet to sort out packaging issues and confirm, but I suspect it will also work in a native zone with a little convincing that it doesn't have to be Linux. </p>
<div class="gmail_quote">On 15 Dec 2015 9:22 am, "Scott Wiersdorf" <<a href="mailto:scott@ipartner.net">scott@ipartner.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Dec 15, 2015 at 08:26:50AM +1100, Daniel Carosone wrote:<br>
> What platform? Linux::Inotify2 and related modules might be a useful<br>
> option, especially if the log file is not heavily active.<br>
<br>
Define "heavily active". On a lighter file I'm expecting at least 60<br>
lines (16k bytes) per second. I might expect an order of magnitude<br>
more than that on a heavier file.<br>
<br>
This module seems promising... but I was hoping for some kind of<br>
platform independent way to do this (it will eventually be deployed on<br>
Linux probably most of the time, but with a possibility of BSD, and my<br>
development is done on a Mac).<br>
<br>
Thank you for the response; I'll look at this approach more closely.<br>
<br>
Scott<br>
--<br>
Scott Wiersdorf<br>
<a href="mailto:scott@ipartner.net">scott@ipartner.net</a><br>
<br>
_______________________________________________<br>
anyevent mailing list<br>
<a href="mailto:anyevent@lists.schmorp.de">anyevent@lists.schmorp.de</a><br>
<a href="http://lists.schmorp.de/mailman/listinfo/anyevent" rel="noreferrer" target="_blank">http://lists.schmorp.de/mailman/listinfo/anyevent</a></blockquote></div>