If you are sure the lines are in the tail buffer, what you probably want is this:
http://www.gnu.org/software/coreutils/manual/html_node/stdbuf-invocation.html Which does look to, finally, be available in the latest distros like RHEL 6.3. Brock On Fri, Sep 21, 2012 at 1:52 PM, Cochran, David M (Contractor) <[email protected]> wrote: > > Is there a way to automatically flush an agent/source tailing a file to the > sink even if the buffer is not yet full every xx seconds? > > Maybe that's not worded quite right... example > > Tailing a log file sending to File_roll sink... works like a charm, however > if activity stops, there are still a number of lines not sent to the sink, > apparently waiting for the buffer to fill up. This can be an issue for me > as I want to have a script reviewing the logs on the sink for errors and > such... but if something goes sideways and is recorded in the last xx lines > not yet sent they could go undetected for a long period of time of not > written to the sink. > > In the case I'm looking at right now, the log I'm tailing has 10 lines that > have not been sent to the sink, since it's Friday afternoon there is little > activity, actually none in the last 3 hours. Taken a step further if the > app crashed and only wrote out 5 lines calling for help, they could go > undetected for a long time. Anyway to flush any standing events to sink > every 30 seconds or so? > > Thanks, > Dave > > -- Apache MRUnit - Unit testing MapReduce - http://incubator.apache.org/mrunit/
