[mythtv-users] mysqlcheck buffers output?
Mike Thomas
mt3 at pfw.demon.co.uk
Thu Oct 22 14:08:06 UTC 2015
On Thu, 22 Oct 2015 08:54:08 -0400
Tom Dexter <digitalaudiorock at gmail.com> wrote:
> On Thu, Oct 22, 2015 at 8:46 AM, Tom Dexter
> <digitalaudiorock at gmail.com> wrote:
> > On Thu, Oct 22, 2015 at 7:24 AM, Mike Thomas <mt3 at pfw.demon.co.uk>
> > wrote:
> >>
> >> If you are experiencing additional buffering this could be because
> >> you are either sending the output through a pipe or file or have an
> >> inconvenient line discipline.
> >>
> >> Yours,
> >>
> >> Mike.
> >
> > That's not the behavior I've seen, and this is with the output going
> > directly to the console. Yes, I would expect it to pause before a
> > large table until it's done, obviously because it's printing the
> > resulting status on that line, but in my experience it does in fact
> > buffer more than that where, for example, several tables prior to a
> > large table may not display at all until the large one is done.
> >
> > This actually wasn't related to my mythconverg database at all, as
> > none of my tables are very large at all and I'd never even notice.
> > I'll do some tests on some databases I have with large tables.
> >
> > Tom
>
> You know, now that I think about this more carefully, it in fact may
> be the case that this has always happened in conjunction with piping
> though the tee command to also output to a file.
>
> That may in fact be adding the extra buffering. I'll test that, but I
> have a feeling that may actually be the cause.
Dear Tom,
I have just run
mysqlcheck [ options ] --analyze --all-databases | tee /dev/null
and I too see buffered output. This is the expected behaviour of tee.
You can try tee in any pipeline and it will do the same.
For an alternative to tee try this:
mysqlcheck [ options ] --analyze --all-databases > file &
tail -f file
There are plenty of options to tail so if you wished to script it I am
sure you could make the above sequence behave similarly to tee.
Mike
More information about the mythtv-users
mailing list