confused by how to generate kernel messages via /dev/kmsg [SOLVED?]

Robert P. J. Day rpjday at crashcourse.ca
Sun May 25 09:12:21 UTC 2014


On Sun, 25 May 2014, Robert P. J. Day wrote:

>
>   (while this is probably not technically a fedora rawhide issue,
> since i'm trying this on rawhide, i figure this would be the best
> place to ask about it.)
>
>   i really should know how to do this, but i'm confused about what
> happens when i try to configure which "kernel" messages i generate
> actually go to the console.
>
>   on my rawhide system, my current log level settings are:
>
> # cat /proc/sys/kernel/printk
> 8	4	1	7
> #
>
> for which my long-time understanding is that the first value
> represents the value less than which messages of that loglevel will
> appear on the system console -- and a value of 8 means all of them.
>
>   so having earlier set that first value manually with:
>
> # echo 8 > /proc/sys/kernel/printk
>
> i can now experiment by generating messages in userspace with
> variations like:
>
> # echo "<0> level 0" > /dev/kmsg
> # echo "<1> level 1" > /dev/kmsg
> # echo "<7> level 7" > /dev/kmsg
>
> and so on. now if i follow the contents of dmesg in real time with:
>
> $ dmesg -w
>
> i can indeed see all of these messages adding their brief contents to
> the dmesg buffer as i generate them.
>
>   *however*, only messages with log level 0 are immediately dumped to
> all of the open xterm windows in my graphical session, which i equate
> with the system console. any messages with log levels 1 through 7 do
> *not* show up that way.

  never mind, i think i can see what's happening ... what gets printed
to the console is controlled by rsyslog which is loading the "imklog"
module, which i'm going to assume is what i would configure to change
what log level messages go to the console, yes? so i guess i better do
some reading up on rsyslog and, in particular, that module.

  does that sound about right?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


More information about the test mailing list