<div class="gmail_quote">On Thu, Sep 6, 2012 at 11:13 PM, Fajar A. Nugraha <span dir="ltr"><<a href="mailto:list@fajar.net" target="_blank">list@fajar.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Fri, Sep 7, 2012 at 7:46 AM, Ken Elkabany <<a href="mailto:Ken@elkabany.com">Ken@elkabany.com</a>> wrote:<br>
> Hi,<br>
><br>
> The following outputs container state changes to the terminal as expected:<br>
><br>
> $ lxc-monitor -n container-1<br>
><br>
> However, the following outputs the same state changes to a file only after a<br>
> certain buffer size has been reached:<br>
><br>
> $ lxc-monitor -n container-1 &> output<br>
><br>
> This is problematic because it means that live monitoring cannot be done by<br>
> a separate program. The buffering delays messages, potentially indefinitely.<br>
><br>
> Is there a way around this?<br>
<br>
</div>(optional: start a screen session)<br>
$ script -f /path/to/your-logfile.txt<br>
$ lxc-monitor -n container-1<br>
<br>
... and on other terminal<br>
$ tail -f /path/to/your-logfile.txt<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Fajar<br>
</font></span></blockquote></div><br><div>Unfortunately, in my application there won't be any open terminals. I simply used that as an example to illustrate my point.</div><div><br></div><div>Ken</div>