lkml.org 
[lkml]   [2007]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Info dump on Oops or panic()
From
Date
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
-
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: 2007-06-29 02:23    [W:0.076 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site