1

I am wondering, in case of a crash, does Linux try to dump the content of its ring buffer (which is used by dmesg) to disk to ease debugging?

If so, how does Linux do it? If somebody could point me to some code, that will be much appreciated.

Thanks.

1 Answer 1

1

when crash/panic happens the syslog does not get a chance to run and so there is very less chance that it will write buffer to disk or /var/log/messages. You have to use kdump to do that for you after the panic.

You can read more on kdump/kexec

http://www.linux-mag.com/id/2998/

https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-kdump.html

https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-kdump-crash-log.html

1
  • 1
    Alternatively, one may instruct the system to additionally dump the kernel log messages to a serial console. This allows to retrieve the log even if syslog did not have a chance to save it the usual way.
    – Eugene
    Oct 15, 2012 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.