[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 1/3] appliance: Prefix kernel messages with timestamp.



With this patch, kernel boot messages get prefixed with a timestamp
counting from the boot, although in fact early messages (before kernel
command line parsing) don't get timestamped.

The output looks something like this:

[    0.003999] Calibrating delay loop (skipped) preset value.. 5866.95 BogoMIPS (lpj=2933478)
[    0.007546] Security Framework initialized
[    0.009056] SELinux:  Disabled at boot.
[    0.012702] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.016942] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.020233] Mount-cache hash table entries: 256

Of course you only see this when the verbose flag is set.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
>From 8ddbb6c236b416f59f03a673a965e429bfda958f Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones redhat com>
Date: Mon, 9 Nov 2009 14:15:43 +0000
Subject: [PATCH 1/3] appliance: Prefix kernel messages with timestamp.

---
 src/guestfs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/guestfs.c b/src/guestfs.c
index f7df27e..896d8a7 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -1157,6 +1157,7 @@ guestfs__launch (guestfs_h *g)
     "udevtimeout=300 " /* good for very slow systems (RHBZ#480319) */	\
     "noapic "          /* workaround for RHBZ#502058 - ok if not SMP */ \
     "acpi=off "        /* we don't need ACPI, turn it off */		\
+    "printk.time=1 "   /* display timestamp before kernel messages */   \
     "cgroup_disable=memory " /* saves us about 5 MB of RAM */
 
     /* Linux kernel command line. */
-- 
1.6.5.rc2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]