From: Andi Kleen <andi@firstfloor.org>
To: Joshua Wise <jwise@google.com>
Cc: linux-kernel@vger.kernel.org, akpm@google.com,
thockin@google.com, mikew@google.com, masouds@google.com
Subject: Re: [PATCH] Info dump on Oops or panic()
Date: 29 Jun 2007 03:15:47 +0200 [thread overview]
Message-ID: <p73r6nv4l30.fsf@bingen.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0706281502350.617@internets.corp.google.com>
Joshua Wise <jwise@google.com> writes:
You are aware that oops screen estate is very precious on standard
systems without serial console?
> +/*
> + * Dump out UTS info on oops / panic.
> + */
> + +static int dump_utsname(struct notifier_block *self, unsigned long
> v, void *p)
> +{
> + printk ("%s %s %s %s %s %s\n",
> + utsname()->sysname,
> + utsname()->nodename,
> + utsname()->release,
> + utsname()->version,
release / version is already printed for oopses. I frankly don't see
the point of the rest of the UTS information because that should be
implicit in the log files (you surely know to which machine the log
belongs)
> +static int dump_uptime(struct notifier_block *self, unsigned long v, void *p)
> +{
> + struct timespec uptime;
> + /* The logic below is very much like how kernel + *
> prepares /proc/uptime. + */
> + do_posix_clock_monotonic_gettime(&uptime);
> + printk("Uptime(seconds): %lu.%02lu\n",
> + (unsigned long) uptime.tv_sec,
> + (uptime.tv_nsec / (NSEC_PER_SEC / 100)));
Wouldn't it be better to just print the time at boot up? If you
have full log files you surely got the boot messages too and
then you can get it from there. Ok it might be tricky if you
don't know when the oops got logged, but surely that is a simple
exercise in text processing to handle this on the console server?
It can be already done with CONFIG_PRINTK_TIME BTW which
will event print it for every line.
-Andi
prev parent reply other threads:[~2007-06-29 0:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-28 22:05 [PATCH] Info dump on Oops or panic() Joshua Wise
2007-06-28 22:18 ` Kyle McMartin
2007-06-28 23:12 ` [PATCH] [revised -- version 2] " Joshua Wise
2007-06-28 23:48 ` Andrew Morton
2007-06-29 2:15 ` Joshua Wise
2007-06-28 23:54 ` [PATCH] " Mike Frysinger
2007-06-29 0:39 ` Jiri Kosina
2007-06-29 2:01 ` Andrew Morton
2007-06-29 1:15 ` Andi Kleen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=p73r6nv4l30.fsf@bingen.suse.de \
--to=andi@firstfloor.org \
--cc=akpm@google.com \
--cc=jwise@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masouds@google.com \
--cc=mikew@google.com \
--cc=thockin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox