Link to home
Start Free TrialLog in
Avatar of doolyo
doolyoFlag for Switzerland

asked on

dmesg and /var/log/messages loglevel configuration

I dont' know if I am getting it right, but I have understood that the dmesg kernel messages are stored in /var/log/messages by the help of syslog, and that syslog was adding a timestamp before each message, is that right?
In that case, why are not all messages of dmesg stored in /var/log/messages and would there be a loglevel we could change so that it woudl log all messages from dmesg?

Avatar of Jozk0
Jozk0
Flag of Netherlands image

they are stored under:

/var/log/boot.msg

this is on opensuse.
Avatar of doolyo

ASKER

I have very few information in this /var/log/boot.log file, much less than in the dmesg output.
its in
/var/log/dmesg
Avatar of doolyo

ASKER

The output of dmesg seems to contain only the boot up messages. I had a lot of "TCP: Treason uncloaked!" messages when I typed 'dmesg'. I have deleted them with 'dmesg -c', and yet I would like to know where they have been stored. I thought it was in /var/log/messages, but yet they are not there nor in any suggested file above. Isn't this related to a loglevel configuration?
syslog 'routes' all messages it receives to multiple logfiles and/or console.  You need to examine /etc/syslog.conf.  Manual pages (syslog and syslog.conf) should help you diagnose the problem (if there is one).
They are not stored on the disk, it's the kernel _buffer log_. These occur before any syslog service is started and reside only in the buffer. If you want, you can store them manually:

  dmesg -c > /var/log/dmesg_log

or add this into one of your startup boot scripts to perform this automatically.
sorry my mistake actually the above happens automatically after boot.
ASKER CERTIFIED SOLUTION
Avatar of Jozk0
Jozk0
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of doolyo

ASKER

Hello, Jozk0.
I am using syslogd. The following line in /etc/syslog.conf is probably what I need:
kern.*      /var/log/kernel_log
This seems to log almost everything, so I must wait that the event I am looking for comes out again and see if it is there. But as it seems to log all kernel messages, and that dmesg shows all kernel messages, I think that this is the solution to my problem!
Thanks a lot,
Daniel