Messages in this thread Patch in this message | | | Date | Wed, 27 Aug 2008 11:16:13 -0400 | From | Joe Korty <> | 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;
| |