DMESG / syslog

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

DMESG / syslog

sven falempin
Dear readers,

This question is probably answer somewhere
but i m afraid to follow any non openBSD style answer.

How do it get DMESG messages in my log ( like when a usb is attached )

syslog *.*  does not contain them right ?

Best,

--
--
---------------------------------------------------------------------------------------------------------------------
Knowing is not enough; we must apply. Willing is not enough; we must do
Reply | Threaded
Open this post in threaded view
|

Re: DMESG / syslog

IL Ka
Hello.
This is "kern" facility.

# touch  /var/log/dmesg

And then add
"kern.* /var/log/dmesg" to your "syslog.conf".
Restart syslog and anything printed by kernel will go to /var/log/dmesg

But note that when booting, kernel does not have access to syslog, so it
stores messages in its internal buffer (which you can read by ``dmesg``)
and after boot, its contents are written to /var/run/dmesg.boot

man syslog.conf
man dmesg

PS: when adding new log file, make sure to configure its rotation using
newsysliog

On Mon, Apr 16, 2018 at 7:14 PM, sven falempin <[hidden email]>
wrote:

> Dear readers,
>
> This question is probably answer somewhere
> but i m afraid to follow any non openBSD style answer.
>
> How do it get DMESG messages in my log ( like when a usb is attached )
>
> syslog *.*  does not contain them right ?
>
> Best,
>
> --
> --
> ------------------------------------------------------------
> ---------------------------------------------------------
> Knowing is not enough; we must apply. Willing is not enough; we must do
>