lkml.org 
[lkml]   [2008]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] printk timestamp post-boot suppression
    Suppress printk timestamping after system boot.

    The timestamp printk prefix seems most useful during boot,
    where it easily shows where the boot sequence is spending
    its time.

    Its utility after boot is questionable, since 1) the
    timestamp becomes a rather large, unreadable integer,
    as the hours, days and weeks go by, and 2) syslog does
    a proper TOD timestamp anyways on these later messages,
    as they go into /var/log/messages.

    Signed-off-by: Joe Korty <joe.korty@ccur.com>

    Index: 2.6.27-rc4-git4/kernel/printk.c
    ===================================================================
    --- 2.6.27-rc4-git4.orig/kernel/printk.c 2008-08-26 16:28:41.000000000 -0400
    +++ 2.6.27-rc4-git4/kernel/printk.c 2008-08-26 16:53:11.000000000 -0400
    @@ -730,7 +730,7 @@
    printed_len += 3;
    new_text_line = 0;

    - if (printk_time) {
    + if (printk_time && system_state == SYSTEM_BOOTING) {
    /* Follow the token with the time */
    char tbuf[50], *tp;
    unsigned tlen;

    \
     
     \ /
      Last update: 2008-08-27 17:19    [W:0.019 / U:1.404 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site