lkml.org 
[lkml]   [2012]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] add blockconsole version 1.1
    On Tue, Jul 24, 2012 at 10:53:35AM -0400, Jörn Engel wrote:
    > On Tue, 24 July 2012 17:42:19 +0200, Borislav Petkov wrote:
    > >
    > > Just a minor nuisance: I have this in the log:
    > >
    > > ...
    > > [ 10.498422] console [bcon0] enabled
    > > [ 10.499899] blockconsole: now logging to /dev/sdc at 1
    > > [ 10.594791] usb 5-2: new full-speed USB device number 3 using ohci_hcd
    > >
    > > [ 12.665911] xhci_hcd 0000:00:10.0: xHCI Host Controller
    > > [ 12.668469] xhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 6
    > > ...
    > >
    > > which doesn't have the empty line with a bunch of '\s' chars:
    > >
    > > ...
    > > [ 10.498422] console [bcon0] enabled
    > > [ 10.499899] blockconsole: now logging to /dev/sdc at 1
    > > [ 10.594791] usb 5-2: new full-speed USB device number 3 using ohci_hcd
    > > [ 12.665911] xhci_hcd 0000:00:10.0: xHCI Host Controller
    > > [ 12.668469] xhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 6
    > > ...
    > >
    > > Do you know per-chance why that happens? I have a couple more lines like
    > > that further in the log file which bcon_tail generated.
    >
    > If there is no logging for a second, blockconsole will flush the
    > current sector. So however much of it is empty will be filled with
    > spaces and a newline at the end. Result are those empty lines.

    ... and this is consistent with the printk timestamps above: 10.5 to
    12.6 seconds = one empty line.

    > The advantage should be better robustness, in particular when dealing
    > with cheap flash devices.

    In the sense that we flush the current sector after one second the
    latest so that we can lose as small amount of data as possible if the
    system crashes right at that point?

    And, at the same time, writes to cheap devices get flushed for sure?

    > Disadvantage is the wasted real estate on your monitor - although
    > sometimes I have found it nice to have syntax highlighting (in a way)
    > for pauses in the logging.

    Ok, I see what you mean. I see a red line in vim here. Ok, good to know,
    maybe this feature with the empty lines could be in the docs too so
    people don't ask that question again?

    Or you issue a tag instead of an empty line like so:

    [ 10.498422] console [bcon0] enabled
    [ 10.499899] blockconsole: now logging to /dev/sdc at 1
    [ 10.594791] usb 5-2: new full-speed USB device number 3 using ohci_hcd
    <<LOG timeout of 1sec>>
    [ 12.665911] xhci_hcd 0000:00:10.0: xHCI Host Controller
    [ 12.668469] xhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 6

    which explains everything.

    Thanks.

    --
    Regards/Gruss,
    Boris.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2012-07-24 20:01    [W:4.072 / U:0.144 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site