Linux Shutdown Error Log
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the shutdown logs linux workings and policies of this site About Us Learn more about Stack how to check server reboot reason linux Overflow the company Business Learn more about hiring developers or posting ads with us Unix & Linux Questions how to check reboot logs in linux Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; ubuntu shutdown log it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How to find out from the logs what caused system shutdown? up vote 45 down vote favorite 7 E.g. I'm seeing this in /var/log/messages: Mar 01 23:12:34 hostname shutdown: shutting down
How To Check Last Reboot Time In Linux
for system halt Is there a way to find out what caused the shutdown? E.g. was it run from console, or someone hit power button, etc.? logs shutdown share|improve this question asked Mar 21 '11 at 19:12 alex 3,17431623 So this time a had some luck with /var/log/acpid: turned out the power button was hit. Any other ideas, where to look if acpid doesn't give a clue? –alex Mar 21 '11 at 19:20 add a comment| 9 Answers 9 active oldest votes up vote 19 down vote accepted +50 Only root privileged programs can gracefully shutdown a system. So when a system shuts down in a normal way, it is either a user with root privileges or an acpi script. In both cases you can find out by checking the logs. An acpi shutdown can be caused by power button press, overheating or low battery (laptop). I forgot the third reason, UPS software when power supply fails, which will send an alert anyway. Recently I had a system that started repeatedly to power off ungracefully, turned out tha
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers
Reboot Log Linux
or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ how to check system reboot logs in linux Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only rhel shutdown log takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How to read the messages during power off up vote 11 down vote http://unix.stackexchange.com/questions/9819/how-to-find-out-from-the-logs-what-caused-system-shutdown favorite 1 I'm using Lubuntu 11.10. Every time I turn off my Sony Vaio I can read FAIL in red letters. But I can not read. I tried to take a photo, but not success. Well, I was not worrying about this but today my laptop frozen during shutting down. I could read something about umount and other messages that I don't remember. So, how to read the log messages and try to discover/solve the problem? logs shutdown laptop share|improve this question http://unix.stackexchange.com/questions/53252/how-to-read-the-messages-during-power-off edited Apr 27 at 15:38 Anthon 47.6k1462125 asked Oct 29 '12 at 21:55 Sigur 85611429 everything recored at /var/log/syslog and /var/log/messages, So you need to read them and throubleshoot. You can use io redirection with error redirection when you use shutdown command –PersianGulf Feb 15 '14 at 19:46 add a comment| 8 Answers 8 active oldest votes up vote 11 down vote +100 There seems to be no way to log this data to a file. For the boot process, there is the bootlogd package which creates the file /var/log/boot, but nothing for the shutdown/reboot process. As far as I can see there is no way to log with rsyslog either, and even if there was, there are messages printed after rsyslog is stopped. Part of my shutdown/reboot process is to remount the rootfs readonly and umount everything else, after this logging to a file that will still be there at the next boot is virtually impossible. The easiest way I can see to view the messages is to edit the /etc/init.d/halt and/or /etc/init.d/reboot scripts to pause just before the actual halt/reboot. For the halt script, run the command sudoedit /etc/init.d/halt (or use a GUI editor) and look for the line that does the actual halt. For me this is the line: halt -d -f $netdown $poweroff $hddown Otherwise it should be at the end of the do_stop function and the only line that calls the halt command. Once you find the line,
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about http://askubuntu.com/questions/24628/which-log-will-tell-me-why-my-computer-shut-down hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Which log will tell me why my computer shut down? up vote 7 down vote favorite 5 I how to was at school SSHing to my homebox. All of a sudden, my connection was closed. Attempting to reconnect failed. When I returned home, I discovered that my computer was off. Nobody was at my house and I am sure that I did not have a power outage. How can I figure out how or why my computer shut off? Is there some log in /var/log that could point me in the right direction? Should there be a core dump somewhere that how to check I should find? If so, how do I use core dumps? power-management share|improve this question edited Jan 9 '14 at 23:46 Braiam 39.1k1693154 asked Feb 3 '11 at 16:47 kzh 550620 add a comment| 2 Answers 2 active oldest votes up vote 4 down vote accepted The relevant files in /var/log are messages, 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. Hope this helps. share|improve this answer edited Jan 13 '14 at 22:00 BuZZ-dEE 6,625104163 answered Feb 4 '11 at 7:03 Jamess 2,14931639 add a comment| up vote 5 down vote It is unusual for a kernel error to shutdown the power, it would either hang with a kernel panic or reboot. It was most likely an hardware issue. If there was a kernel panic search for "kernel panic" on the logs dir: grep -r "kernel panic" /var/log share|improve this answer answered Feb 3 '11 at 18:18 Joao Pinto 12.3k23853 +1 for suggesting that it is a hardware problem. –Bobby Feb 3 '11 at 19:15 The computer shutdown very well could have been a hardware problem. Sometimes it is a toddler problem. (My two year old loves the shiny blue pow