how to collect previous kernel logs in linux after reboot and how to search the old logs?

Initially when system is rebooted the logs are not captured and found rest of the log's.But there is an error in the previous log which is not captured???

  • Three places to check; Output from the dmesg command, the /var/log/boot.log, and /var/log/messages (Note: It would be helpful if you mentioned / tagged your actual Linux distribution in your question) – Signal15 Dec 5 '14 at 15:53
  • Also, dmesg output may already be caught-up in /var/log/dmesg.log (Depending on your Linux distribution). If not, it's a simple thing to put in an rc.local script (dmesg >> /var/log/dmesg.log), and you might want to include that in the log-rotation so it doesn't endlessly append to the file. – Signal15 Dec 5 '14 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.