본문 바로가기
Binary Life/펭귄

If all [else] fails, you may still be able to communicate with the Kernel.

by 로제마인 2008. 10. 26.
예전에 본거였는데, 돌아다니다가 보여서 적어둬요☆

Alt+SysRq

If all else fails, you may still be able to communicate with the Kernel.

To use, just press the Alt and SysRq (PrintScreen) keys and one of the keys listed below, all together. You should try switch into a terminal window, if possible, first by pressing Ctrl+Alt+F2.

If your computer is not responding you can use the following steps to perform a reboot with less chance of fscking your files. This is the method suggested on Wikipedia's Magic SysRq key page.

  1. Press Ctrl+Alt+F2 to switch to a terminal window. Sometimes, this is not possible.
  2. Press Alt+SysRq+R to get the keyboard
  3. If pressing Ctrl+Alt+F2 before failed, try it again now.
  4. Press Alt+SysRq+S to sync your disks.
  5. Wait for OK or Done message.
  6. Press Alt+SysRq+E to term all processes.
  7. Press Alt+SysRq+I to kill all processes.
  8. Press Alt+SysRq+U to umount all disk drives.
  9. Wait for OK or Done message.
  10. Press Alt+SysRq+B to reboot.

The Full list of available commands is shown below. It's largely taken from Documentation/sysrq.txt in the Linux Kernel Sources.

Alt+SysRq+ Action Uses
R UnRaw Turns off keyboard raw mode. This allows input from the keyboard even if X-Window has crashed.
K SAK - Kill all on console Secure Access Key - Kills all programs on the current virtual console. This is useful if you want to make sure there are no programs waiting on the console to grab your password, or if a process won't let you switch consoles.
S Sync Attempts to sync all filesystems. This lessens the chance of data loss and fscking. Syncing is complete when "done" or "OK" is printed.
U Umount Attempts to remount all filesystems as read-only. Umounting is complete when "done" or "OK" is printed.
B Reboot Will immediately reboot without syncing or unmounting any disks. Before using this use Alt+SysRq+S and Alt+SysRq+U to avoid data loss.
C Crashdump Will perform a kexec reboot, in order to take a crashdump. Before using this use Alt+SysRq+S and Alt+SysRq+U to avoid data loss.
O Power Off Turns off the computer without syncing or unmounting disks. Before using this use Alt+SysRq+S and Alt+SysRq+U to avoid data loss.
P Show Pc Attempts to dump all registers and pointers to console.
T Show Tasks Attempts to dump a list of all tasks to console.
M Show Memory Info Displays memory info to console
V Voyager processor info Dumps Voyager SMP processor info to your console.
0-8 Kernеl Error Verbosity Set the console log level for kernel messages. Setting to 0 only shows messages like PANIC and OOPS
F OOM Kill Calls oom_kill to kill a memory hog process
E Term Sends SIGTERM signal to all processes.
I Kill Kills (sends SIGKILL signal to) all processes.
L Kill + Kill Init Kills (sends SIGKILL signal to) all processes, including init. You will not be able to do anything else after using this!
N Nice Make real-time processes nice-able.
H Help Prints some help

출처 : http://en.wikibooks.org/wiki/Linux_Guide/Freezes
관련 : http://en.wikipedia.org/wiki/Magic_SysRq_key
참고 : http://jeongsw.tistory.com/178

'Binary Life > 펭귄' 카테고리의 다른 글

'$> ps aux' column.  (0) 2008.11.16
USB in Guest OS of VirtualBox on ubuntu intrepid.  (0) 2008.11.13
우분투 8.10 베타 기준 // XNOTE R200에서 한글 환경 설정  (4) 2008.10.22
ubuntu font antialias  (0) 2008.03.25
Directory Tree  (2) 2007.09.19