Ask Your Question
1

System log after reboot

asked 2015-07-18 19:27:30 -0500

Federico gravatar image

My system crashed with a kernel panic and I need the syslog; dmesg of course doesn't help, but where is the old sytem log? ls /var/log/ doesn't find anything.

Allegedly, the log is now in a journal, but journalctl is not helping. I only want the kernel message log à la dmesg but for the single session before the current one, nothing hard.

edit retag flag offensive close merge delete

Comments

2

The journalcl command to see kernel messages from the previous boot is journalctl -k -b -1. There are many filtering options described in the manpage.

randomuser gravatar imagerandomuser ( 2015-07-18 20:34:14 -0500 )edit

Thanks; that should be an answer. :) Stresses my hard disk horribly, though.

Federico gravatar imageFederico ( 2015-07-20 10:20:27 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2015-07-18 19:41:21 -0500

Federico gravatar image

The system logs are not named syslog.log or similar as you may expect. They instead are at /var/log/messages*, e.g.

$ ls /var/log/messages*
/var/log/messages  /var/log/messages-20150621  /var/log/messages-20150629  /var/log/messages-20150705  /var/log/messages-20150713

However these are only populated at some point by rsyslogd fetching from a journal (if you let it do this job). I have no idea how to fetch kernel messages from the previous session, I can't find kernel panic messages either.

edit flag offensive delete link more

Comments

kernel panic messages are before journald spins up. Mcelog and dmesg are the 2 that come to mind. Otherwise, it is as @randomuser posited: journalctl -k -l -b -1 for session before this one. For 4 sessions ago you would journalctl -k -l -b -4. dmesg -xTH puts extra information and makes it more human-readable.

NuuN gravatar imageNuuN ( 2015-07-19 00:35:12 -0500 )edit

So that's why I don't see my kernel panic message in there?

Federico gravatar imageFederico ( 2015-07-20 10:20:44 -0500 )edit

Yes. Kernel panics and journald are like you not waking from a dream in order to write your diary. Mcelog tries to log those dreams.

NuuN gravatar imageNuuN ( 2015-07-20 10:39:25 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-07-18 19:27:30 -0500

Seen: 2,848 times

Last updated: Jul 18 '15