I would like to check if my computer with Ubuntu 14.04 was actively shutdown, or whether it crashed. I come into the office in the morning and my computer is off while it should have been on. This has happened a number of consecutive days, and I can check the computer goes off around the same time each night. So I want to know if my computer crashed or whether somebody shut it off. Is there a way to get this information from the logs?
Asked
Active
Viewed 4,515 times
2 Answers
2
Find in /var/log a dmesg issue, command last to see the exact reboot time. You will see a line starting with reboot (or may be shutdown) for all reboot/crash.
cat /var/log/messages from a terminal and check for messages at the time stamp of reboot or just before it. dmesg can give the last boot time messages.
Jack Fosters
- 145
1
Issue the command
grep rsyslogd /var/log/syslog
or for less noise
grep -E 'rsyslogd.*(exit|start)'
If you see matched pairs of (blah blah)exit(blah blah) followed by (blah blah)start lines the system shutdown (at least somewhat) cleanly. If you have two (blah blah)start lines in a row the system did not shutdown cleanly.
SensorSmith
- 241