Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
26
rated 0 times [  26] [ 0]  / answers: 1 / hits: 59109  / 1 Year ago, thu, may 25, 2023, 9:13:58

How can tell that my last shutdown was properly done in Ubuntu 11.10 or if the machine was powered off before shutting down the OS?


More From » shutdown

 Answers
5

If the machine was shutdown properly then there must be a shutdown log logged in kern.log file in /var/log directory. After a shutdown whenever a normal boot occurs the OS writes the log for the same in kern.log. Hence every boot log must be preceded by a shutdown log if the booting and shutdown process was normal.



Whenever a normal shutdown occurs "Kernel logging (proc) stopped." is written in kern.log.
Similarly whenever a boot occurs "imklog 5.8.1, log source = /proc/kmsg started." is written in kern.log



These two messages should be in the order if the shutdown was normal rather than abrupt power off. There should be no "imklog 5.8.1, log source = /proc/kmsg started." message without the "Kernel logging (proc) stopped." message if the previous shutdown was normal. The both message should always occur in pair in log.enter image description here



Just type in terminal :-



gedit /var/log/kern.log


and check for the shutdown and boot log pairs. If they are found not in pairs anywhere
that shutdown must have been abrupt.


[#40459] Friday, May 26, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cugure

Total Points: 188
Total Questions: 110
Total Answers: 103

Location: Dominican Republic
Member since Sun, Sep 4, 2022
2 Years ago
;