mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Fengguang Wu <fengguang.wu@intel.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Mark Brown <broonie@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [RFC][PATCH] printk: add console_msg_format command line option
Date: Fri, 8 Dec 2017 01:03:53 +0900	[thread overview]
Message-ID: <20171207160353.GA481@tigerII.localdomain> (raw)
In-Reply-To: <20171207154500.qw4oaottbczpt6qx@pathway.suse.cz>

On (12/07/17 16:45), Petr Mladek wrote:
[.,]
> > hmm... `dmesg -S --raw' doesn't show anything on my system. `dmesg --raw'
> > matches the console_msg_format=syslog.
> 
> Huh, I am confused now. I thought that I saw the extended, /dev/kmsg - like,
> output with "dmesg --raw" but I do not see it now.
> 
> Anyway, I can see a difference related to
> /sys/module/printk/parameters/time. The command "dmesg --raw" always
> shows the timestamp help because it reads the messages via /dev/kmsg.
> But "dmesg -S --raw" shows the timestamp only when the "time"
> parameter is enabled:

aha, I see your point. -S forces dmesg to use syslog() syscall. so it
doesn't access the kmsg. otherwise it attempts to read from kmsg first.
you are right.

> $> echo 0 >/sys/module/printk/parameters/time
> $> dmesg -S --raw | head -n 3
> <5>Linux version 4.15.0-rc2-5-default+ (pmladek@pathway) (gcc version 4.8.5 (SUSE Linux)) #4180 SMP Thu Dec 7 16:06:42 CET 2017
> <6>Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-rc2-5-default+ root=UUID=9ba368bb-c323-4131-ad94-c29cf3add76f resume=/dev/sda2 earlyprintk=ttyS0,115200 console=tty0 console=ttyS0,115200 console_msg_format=syslog ignore_loglevel nosplash showopts crashkernel=256M,high crashkernel=128M,low
> <6>x86/fpu: x87 FPU will use FXSAVE
> $> echo 1 >/sys/module/printk/parameters/time
> $> dmesg -S --raw | head -n 3
> <5>[    0.000000] Linux version 4.15.0-rc2-5-default+ (pmladek@pathway) (gcc version 4.8.5 (SUSE Linux)) #4180 SMP Thu Dec 7 16:06:42 CET 2017
> <6>[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-rc2-5-default+ root=UUID=9ba368bb-c323-4131-ad94-c29cf3add76f resume=/dev/sda2 earlyprintk=ttyS0,115200 console=tty0 console=ttyS0,115200 console_msg_format=syslog ignore_loglevel nosplash showopts crashkernel=256M,high crashkernel=128M,low
> <6>[    0.000000] x86/fpu: x87 FPU will use FXSAVE

I see.

> To be honest, I am somehow confused by the terminology.
> We should make it clear that the "syslog" console format
> is the same as the format used by the syslog syscall.

yeah. that was exactly my point. syslog format means that

 : we do what reading from /proc/kmsg does -- do_syslog(). which "is"
 : the same for some dmesg modes.

I thought that `dmesg --raw' always uses do_syslog(), apparently this
is not the case, and that "is" was not correct.

	-ss

      reply	other threads:[~2017-12-07 16:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 10:44 Sergey Senozhatsky
2017-12-07 13:48 ` Petr Mladek
2017-12-07 14:01   ` Sergey Senozhatsky
2017-12-07 15:45     ` Petr Mladek
2017-12-07 16:03       ` Sergey Senozhatsky [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=20171207160353.GA481@tigerII.localdomain \
    --to=sergey.senozhatsky@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=fengguang.wu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=khilman@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /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

all inboxes | Powered by JetHome®