[mythtv-users] mysqlcheck buffers output?

Tom Dexter digitalaudiorock at gmail.com
Thu Oct 22 13:44:50 UTC 2015


On Thu, Oct 22, 2015 at 8:54 AM, 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.
>
> Tom

Ahh...yup.  I stand corrected...sorry for the noise  The extra
buffering was in fact being caused by the use of tee.  One way to work
around that is, for example:

stdbuf -oL mysqlcheck -u <user> -p <database> | tee outputfile.txt

Thanks for the replies.
Tom


More information about the mythtv-users mailing list