My computer hangs after an hour of continuous use. I have to press Alt+SysRq+r+e+u+i+b to restart the computer. Where in the syslog can I identify when I restarted the computer so I can try to understand why my computer hangs?
-
I would analyse syslog errors and would search google for know problems (i.e. ext4 filesystems/noveau drivers/radeon cards/realtek wifis). The filesystem maybe even in read-only mode and you wont find that time. Good luck. – Rui F Ribeiro Jan 01 '16 at 16:29
1 Answers
Some of these requests leave something in the system logs, for example Alt+SysRq+S emits this in the kernel logs:
vmunix: [15446734.901359] SysRq : Emergency Sync
vmunix: [15446735.370247] Emergency Sync complete
Other requests emit at least an initial SysRq :
message, at the info priority. For example Alt+SysRq+R logs “SysRq : Keyboard mode set to system default”.
Of course anything after Alt+SysRq+U cannot be shown in the logs since there are no more filesystems to write the logs to. And anything after Alt+SysRq+E will not be shown in the logs since there is no longer a syslog process to record them. Furthermore, you'll need to wait a bit before either of these requests, otherwise they might shut down a necessary subsystem before the log message could be processed (and in particular I don't think there's time for the Alt+SysRq+U or Alt+SysRq+E messages to be logged to a file).
So if you want to give the log message a chance to be written, pause for a second or two after the initial Alt+SysRq+S. Forget about Alt+SysRq+R, Alt+SysRq+E and Alt+SysRq+I which are completely pointless since you're going to reboot anyway. Go Alt+SysRq+S, pause to wait for the message to be logged, Alt+SysRq+U, pause to wait for the unmounting to finish, Alt+SysRq+B.
If the system is locked up, which is a common reason to do this emergency reboot, then you won't get any log entry. There are unix systems (Solaris, for one) that manage to keep the logging subsystem running even after a kernel panic, but Linux doesn't go that far.

- 829,060