Re: [PATCH] netconsole: Append kernel version to message

From: Breno Leitao
Date: Tue Jul 04 2023 - 11:16:01 EST


Hello Stephen,

On Mon, Jul 03, 2023 at 11:34:10AM -0700, Stephen Hemminger wrote:
> On Mon, 3 Jul 2023 08:41:54 -0700
> leitao@xxxxxxxxxx wrote:
>
> > +config NETCONSOLE_UNAME
> > + bool "Add the kernel version to netconsole lines"
> > + depends on NETCONSOLE
> > + default n
> > + help
> > + This option causes extended netcons messages to be prepended with
> > + kernel uname version. This can be useful for monitoring a large
> > + deployment of servers, so, you can easily map outputs to kernel
> > + versions.
>
> This should be runtime configured like other netconsole options.
> Not enabled at compile time.

Do you mean I should add a new option to netconsole line? This is the
current line format today:

[+][src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr]

If that is the case, I suppose I want to add something at the beginning
of format, that specify that uname should be sent. What about something
as?

[u][+][src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr]

Thanks!