Messages in this thread | | | Date | Wed, 13 Jun 2012 11:15:00 -0400 | From | Mark Lord <> | Subject | Re: logging on kernel panic |
| |
On 12-06-13 10:52 AM, Mahmood Naderan wrote: > >> The kernel log may not hit /var/log/syslog when kernel panics, > Can I ask why. Just before a panic, kernel is still alive and can log. > Isn't that?
The kernel writes log messages to a circular in-RAM fifo (/proc/kmsg). They then later get saved to a file such as /var/log/syslog by some userspace task, eg. rsyslogd or syslogd.
At the point a Kernel Panic, the kernel is considered "dead", or "non trustworthy" due to the error condition that triggered the panic. Attempting to continue after the panic would be unwise, with the possibilities including opening huge security holes/leaks and/or corrupting user data.
So it is no longer alive, and will not be scheduling the userspace tasks that might copy the log to a file for you. Thus, nothing gets saved.
| |